From patchwork Mon Feb 2 12:45:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 44126 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 258512034D for ; Mon, 2 Feb 2015 12:48:58 +0000 (UTC) Received: by mail-wg0-f71.google.com with SMTP id y19sf16057628wgg.2 for ; Mon, 02 Feb 2015 04:48:57 -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=TWOgmrsZEaf1rqUKnvz1TD11I5NrLXdp0icY5Zhnqc0=; b=OgufDKbVNSqelRtwYyTdYC2p3/FATPOH9CcZjm4cs8gECNQjWkdlnXgWFwiRsN7jDq 4aqyHSc0QMBToKufxpjYIEiD3XpOyNW4DZC3U52e12Lqy3hDkyhd+dXVH8yruwL15X6H U0gqWs3vWyTB88e+pSH+dECg5/fixqNV515D6hiq/JI68jdQlNxGjRaM9l3YZN9jR2uR 5arddT7lv5r0P6NeONzL5WccjVg5jYwkgBTmHqWzk0xL/4CjbzaQirsJIe1+FJd4cV62 nX2TCeHNuj5i8krd0KPhgp11YC+eKv5VQDp5aVMz/Qx16XJ5A9xLQON8UxKWysj6o2Ql Hj5Q== X-Gm-Message-State: ALoCoQkc221/IpksfoGE6WOijzlN+EEL/evROEQomtayoICx5c1RFK1GqO3sL5ZrTnBqXFqaaV3r X-Received: by 10.112.35.135 with SMTP id h7mr2312249lbj.23.1422881337489; Mon, 02 Feb 2015 04:48:57 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.26.74 with SMTP id j10ls257821lag.7.gmail; Mon, 02 Feb 2015 04:48:57 -0800 (PST) X-Received: by 10.112.67.41 with SMTP id k9mr19386069lbt.35.1422881337239; Mon, 02 Feb 2015 04:48:57 -0800 (PST) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com. [209.85.215.42]) by mx.google.com with ESMTPS id cf4si4764083lbb.33.2015.02.02.04.48.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:56 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id ms9so40334513lab.1 for ; Mon, 02 Feb 2015 04:48:56 -0800 (PST) X-Received: by 10.152.3.70 with SMTP id a6mr19264954laa.71.1422881336794; Mon, 02 Feb 2015 04:48:56 -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 h5csp1273128lbj; Mon, 2 Feb 2015 04:48:55 -0800 (PST) X-Received: by 10.70.36.204 with SMTP id s12mr28897827pdj.3.1422881334867; Mon, 02 Feb 2015 04:48:54 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5si23484620pas.146.2015.02.02.04.48.53; Mon, 02 Feb 2015 04:48:54 -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 S932514AbbBBMst (ORCPT + 29 others); Mon, 2 Feb 2015 07:48:49 -0500 Received: from mail-pa0-f47.google.com ([209.85.220.47]:32904 "EHLO mail-pa0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755240AbbBBMsn (ORCPT ); Mon, 2 Feb 2015 07:48:43 -0500 Received: by mail-pa0-f47.google.com with SMTP id lj1so81974944pab.6 for ; Mon, 02 Feb 2015 04:48:43 -0800 (PST) X-Received: by 10.66.102.41 with SMTP id fl9mr28839102pab.7.1422881323251; Mon, 02 Feb 2015 04:48:43 -0800 (PST) Received: from localhost ([180.150.157.4]) by mx.google.com with ESMTPSA id gj9sm18756777pbc.32.2015.02.02.04.48.41 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 02 Feb 2015 04:48:42 -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 , Daniel Lezcano , Mark Brown , Rob Herring , Robert Richter , Randy Dunlap , Charles.Garcia-Tobin@arm.com, phoenix.liyi@huawei.com, Timur Tabi , Ashwin Chaugule , suravee.suthikulpanit@amd.com, Mark Langsdorf , 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 v8 05/21] ACPI / sleep: Introduce sleep_arm.c Date: Mon, 2 Feb 2015 20:45:33 +0800 Message-Id: <1422881149-8177-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422881149-8177-1-git-send-email-hanjun.guo@linaro.org> References: <1422881149-8177-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.42 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. CC: Rafael J. Wysocki Tested-by: Suravee Suthikulpanit Tested-by: Yijing Wang Tested-by: Mark Langsdorf Tested-by: Jon Masters Tested-by: Timur Tabi 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..bcec54e 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; +}