From patchwork Wed Feb 25 08:39:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 45029 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5347320502 for ; Wed, 25 Feb 2015 08:46:36 +0000 (UTC) Received: by lbiz11 with SMTP id z11sf1712056lbi.2 for ; Wed, 25 Feb 2015 00:46:35 -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=oBkIBoZDe2TCaFyCiU/4lRU96IK4KUKxX/oqAj/kcww=; b=cGspkTJfxJiDGm8t1YUDJVRkn8JO6YuJ55bIA9afT50qgRiucqRSGuyCzFyE3PL0rE 6pvVK1SIfNKxHCd9g28PAKJmUVAUHjUbhp2JiVjMZWz3bnEGKFsFYUiLh7x0130ipukp 74DIEc3yHsJOBcyemj5OeDEGGuR/JU53FGn1iIkuzsWWM5bbljisgbjH4AO/eH/x6Mnx kp+5H81ptrKmoO0J2dlk7nh5K7ZpSmyvTob+8ZlzYYBTmik+hYeyrxaHguISJIk/xbgl PKjKWUHrW1WfpWBMtcQb7/KslOmtoyVlXNYAEf528Y2C5YaioHg+QQX/RKzOSTLpsNsO rVmA== X-Gm-Message-State: ALoCoQkPRMF2AMb50HqHVmICTxse5aqEsUXy4q1+gdFG+qIA2/Lpc5yAbdM8wrCIv2LBElfJK0Q5 X-Received: by 10.112.131.106 with SMTP id ol10mr288123lbb.20.1424853995237; Wed, 25 Feb 2015 00:46:35 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.88.84 with SMTP id be20ls604355lab.89.gmail; Wed, 25 Feb 2015 00:46:35 -0800 (PST) X-Received: by 10.112.118.211 with SMTP id ko19mr1783013lbb.19.1424853994992; Wed, 25 Feb 2015 00:46:34 -0800 (PST) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id uj9si28049965lbb.97.2015.02.25.00.46.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Feb 2015 00:46:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by labgm9 with SMTP id gm9so2389593lab.2 for ; Wed, 25 Feb 2015 00:46:34 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr1881646lbc.56.1424853994716; Wed, 25 Feb 2015 00:46:34 -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.35.133 with SMTP id h5csp2477542lbj; Wed, 25 Feb 2015 00:46:33 -0800 (PST) X-Received: by 10.70.44.203 with SMTP id g11mr3719284pdm.130.1424853992900; Wed, 25 Feb 2015 00:46:32 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ry1si29582116pab.184.2015.02.25.00.46.31; Wed, 25 Feb 2015 00:46:32 -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 S1753215AbbBYIl5 (ORCPT + 28 others); Wed, 25 Feb 2015 03:41:57 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:41903 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047AbbBYIly (ORCPT ); Wed, 25 Feb 2015 03:41:54 -0500 Received: by pdno5 with SMTP id o5so3374089pdn.8 for ; Wed, 25 Feb 2015 00:41:53 -0800 (PST) X-Received: by 10.68.209.133 with SMTP id mm5mr3765530pbc.54.1424853713827; Wed, 25 Feb 2015 00:41:53 -0800 (PST) Received: from localhost ([167.160.116.82]) by mx.google.com with ESMTPSA id nq16sm30964141pdb.85.2015.02.25.00.41.51 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 25 Feb 2015 00:41:53 -0800 (PST) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Grant Likely Cc: Lorenzo Pieralisi , Arnd Bergmann , Mark Rutland , Graeme Gregory , Sudeep Holla , Jon Masters , Marc Zyngier , Mark Brown , Robert Richter , Timur Tabi , Ashwin Chaugule , suravee.suthikulpanit@amd.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 v9 07/21] ACPI / sleep: Introduce arm64 specific acpi_sleep.c Date: Wed, 25 Feb 2015 16:39:47 +0800 Message-Id: <1424853601-6675-8-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1424853601-6675-1-git-send-email-hanjun.guo@linaro.org> References: <1424853601-6675-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.43 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 management, so introduce acpi_sleep.c to allow other drivers to function until S states are defined. Since it is arm64 specific stub holder, so let acpi_sleep.c to ARM64 specific. TODO: merge this with drivers/acpi/sleep.c once we fix the specification. CC: Rafael J. Wysocki Tested-by: Suravee Suthikulpanit Tested-by: Yijing Wang Tested-by: Mark Langsdorf Tested-by: Jon Masters Tested-by: Timur Tabi Tested-by: Robert Richter Acked-by: Robert Richter Signed-off-by: Graeme Gregory Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- arch/arm64/kernel/Makefile | 2 +- arch/arm64/kernel/acpi_sleep.c | 28 ++++++++++++++++++++++++++++ drivers/acpi/Makefile | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 arch/arm64/kernel/acpi_sleep.c diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile index 218eb7e..4435943 100644 --- a/arch/arm64/kernel/Makefile +++ b/arch/arm64/kernel/Makefile @@ -34,7 +34,7 @@ arm64-obj-$(CONFIG_KGDB) += kgdb.o arm64-obj-$(CONFIG_EFI) += efi.o efi-stub.o efi-entry.o arm64-obj-$(CONFIG_PCI) += pci.o arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o -arm64-obj-$(CONFIG_ACPI) += acpi.o +arm64-obj-$(CONFIG_ACPI) += acpi.o acpi_sleep.o obj-y += $(arm64-obj-y) vdso/ obj-m += $(arm64-obj-m) diff --git a/arch/arm64/kernel/acpi_sleep.c b/arch/arm64/kernel/acpi_sleep.c new file mode 100644 index 0000000..54578ef --- /dev/null +++ b/arch/arm64/kernel/acpi_sleep.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; +} diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 623b117..c32edf5 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile @@ -23,7 +23,9 @@ acpi-y += nvs.o # Power management related files acpi-y += wakeup.o +ifneq (,$(findstring $(ARCH),x86 ia64)) acpi-y += sleep.o +endif acpi-y += device_pm.o acpi-$(CONFIG_ACPI_SLEEP) += proc.o