From patchwork Wed Jan 14 15:04:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 43111 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f71.google.com (mail-la0-f71.google.com [209.85.215.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D73EE240B9 for ; Wed, 14 Jan 2015 15:07:41 +0000 (UTC) Received: by mail-la0-f71.google.com with SMTP id q1sf5170032lam.2 for ; Wed, 14 Jan 2015 07:07:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=CbDpCFqb9yN+9hFMKyq8hh3w1+VXl//BXeuaNtgf2RQ=; b=mBhLpAQ+dLRhP68zaSu9/khlJbqn/B0Z9xXhtfHH1ThHiIlnh5N0quM7NdlUm0D5aP se80pq8cadpr8UdlKL9ohF6HyBGVO0KzQ6QeWIRNBIJgh3ega9SRPLAnwKe+uzoM9sTQ W+dRLDzbSxP61PYTFTqZqdQ92ZuBIi3wF57x43do5RUSgHSL+xcuy3Rq28qzjko5eyxv mQwQ/CQkxotznw1GoZhacMZZlp92f58qShn3Y/pc04ftJeBq598wEaQHEbyH3JTEPANs KAcSQpTHfa5QntvZie9CyYE4D8uTpKM3UxEvTZNL859JUW5bgdB/V/GA2rJSbqbCpaAe 9d1g== X-Gm-Message-State: ALoCoQkIFmSAHjsZA0hir6ihq+e8NwZODJpFkIPR2omOC+nQnjKm2+rpGz7a0CcjR24xjUpNx3mC X-Received: by 10.180.105.97 with SMTP id gl1mr3668692wib.7.1421248060860; Wed, 14 Jan 2015 07:07:40 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.66 with SMTP id 2ls140015lak.10.gmail; Wed, 14 Jan 2015 07:07:40 -0800 (PST) X-Received: by 10.112.38.4 with SMTP id c4mr4521941lbk.46.1421248060676; Wed, 14 Jan 2015 07:07:40 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id dv9si27505280lbc.63.2015.01.14.07.07.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 14 Jan 2015 07:07:40 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id q1so8610930lam.5 for ; Wed, 14 Jan 2015 07:07:40 -0800 (PST) X-Received: by 10.112.170.36 with SMTP id aj4mr4395746lbc.3.1421248060579; Wed, 14 Jan 2015 07:07:40 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp1726102lbb; Wed, 14 Jan 2015 07:07:39 -0800 (PST) X-Received: by 10.70.131.104 with SMTP id ol8mr6175206pdb.81.1421248056182; Wed, 14 Jan 2015 07:07:36 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pp4si31177681pbb.0.2015.01.14.07.07.35; Wed, 14 Jan 2015 07:07:36 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753576AbbANPHV (ORCPT + 28 others); Wed, 14 Jan 2015 10:07:21 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:50395 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753511AbbANPHO (ORCPT ); Wed, 14 Jan 2015 10:07:14 -0500 Received: by mail-pa0-f51.google.com with SMTP id ey11so10993469pad.10 for ; Wed, 14 Jan 2015 07:07:14 -0800 (PST) X-Received: by 10.70.91.239 with SMTP id ch15mr6325268pdb.142.1421248033954; Wed, 14 Jan 2015 07:07:13 -0800 (PST) Received: from localhost (119.81.172.112-static.reverse.softlayer.com. [119.81.172.112]) by mx.google.com with ESMTPSA id gl6sm19942184pbc.26.2015.01.14.07.07.11 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 14 Jan 2015 07:07:13 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Olof Johansson , Arnd Bergmann , Mark Rutland , Grant Likely , Will Deacon Cc: Lorenzo Pieralisi , Graeme Gregory , Sudeep Holla , Jon Masters , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Mark Brown , Rob Herring , Robert Richter , Randy Dunlap , Charles.Garcia-Tobin@arm.com, phoenix.liyi@huawei.com, Timur Tabi , suravee.suthikulpanit@amd.com, wangyijing@huawei.com, linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, Tomasz Nowicki , Hanjun Guo Subject: [PATCH v7 03/17] ARM64 / ACPI: Introduce sleep-arm.c Date: Wed, 14 Jan 2015 23:04:51 +0800 Message-Id: <1421247905-3749-4-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1421247905-3749-1-git-send-email-hanjun.guo@linaro.org> References: <1421247905-3749-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Graeme Gregory ACPI 5.1 does not currently support S states for ARM64 hardware but ACPI code will call acpi_target_system_state() for device power managment, so introduce sleep-arm.c to allow other drivers to function until S states are defined. Tested-by: Suravee Suthikulpanit Tested-by: Yijing Wang Signed-off-by: Graeme Gregory Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- drivers/acpi/Makefile | 4 ++++ drivers/acpi/sleep-arm.c | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 drivers/acpi/sleep-arm.c diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index f74317c..39f3ec1 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,7 +23,11 @@ acpi-y += nvs.o # Power management related files acpi-y += wakeup.o +ifeq ($(ARCH), arm64) +acpi-y += sleep-arm.o +else # X86, IA64 acpi-y += sleep.o +endif acpi-y += device_pm.o acpi-$(CONFIG_ACPI_SLEEP) += proc.o diff --git a/drivers/acpi/sleep-arm.c b/drivers/acpi/sleep-arm.c new file mode 100644 index 0000000..54578ef --- /dev/null +++ b/drivers/acpi/sleep-arm.c @@ -0,0 +1,28 @@ +/* + * ARM64 Specific Sleep Functionality + * + * Copyright (C) 2013-2014, Linaro Ltd. + * Author: Graeme Gregory + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#include + +/* + * Currently the ACPI 5.1 standard does not define S states in a + * manner which is usable for ARM64. These two stubs are sufficient + * that system initialises and device PM works. + */ +u32 acpi_target_system_state(void) +{ + return ACPI_STATE_S0; +} +EXPORT_SYMBOL_GPL(acpi_target_system_state); + +int __init acpi_sleep_init(void) +{ + return -ENOSYS; +}