From patchwork Fri Sep 12 14:00:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 37326 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A2E79203EE for ; Fri, 12 Sep 2014 14:01:31 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id v6sf514627lbi.3 for ; Fri, 12 Sep 2014 07:01:30 -0700 (PDT) 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=cIkjyUkZwPVJM8pB1CCiWKzqZXWTY5MXE/QHGMgA5LA=; b=GvQa54Lv6icNDY8VFLo4KSq30FoPAljoa35j0Ez+95iMV9P3I1spySQiTcTqcGtwb4 adaS4Cs6+m+2Zo1Zv6YnPJvF4BCFukTy+Zs1CMDdMimeOpuiuR1EVHCU78GKfDN1jC0k qilv49C83mbl/MakRplbTJNMBRCUg4crcYLOMl5wPpb+6ZGEAaJqkzHAPLb5Iy1Xl2Xu RJKFluQcQWoroZeH+FX3kj6PgQFPHq3cwDv78Gy5ps4+BXUgPZ1NLqDVQ3rmMNRRo01J uKz9sELAFi23SxtHn8iOjLr2Aaxa+9TNHXgHLs4glpGmS1I4v39WuJ8k9cwFwu6lIhE5 UpKA== X-Gm-Message-State: ALoCoQmndhjYjQBvCuzr+u2v4sS9KRbtJDPSk3CgpAlaDSrzLIW4D5H4+cQUlxVbu1VImbsIFvvW X-Received: by 10.180.88.8 with SMTP id bc8mr706676wib.0.1410530489081; Fri, 12 Sep 2014 07:01:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.121.72 with SMTP id li8ls170988lab.25.gmail; Fri, 12 Sep 2014 07:01:28 -0700 (PDT) X-Received: by 10.152.21.42 with SMTP id s10mr9257433lae.61.1410530488797; Fri, 12 Sep 2014 07:01:28 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com [209.85.217.177]) by mx.google.com with ESMTPS id b9si6709189lbp.50.2014.09.12.07.01.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 12 Sep 2014 07:01:28 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id l4so942200lbv.36 for ; Fri, 12 Sep 2014 07:01:28 -0700 (PDT) X-Received: by 10.112.75.233 with SMTP id f9mr8787737lbw.102.1410530488696; Fri, 12 Sep 2014 07:01:28 -0700 (PDT) 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.141.42 with SMTP id rl10csp737581lbb; Fri, 12 Sep 2014 07:01:27 -0700 (PDT) X-Received: by 10.70.98.176 with SMTP id ej16mr13442945pdb.165.1410530485908; Fri, 12 Sep 2014 07:01:25 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id iv3si8220138pbd.30.2014.09.12.07.01.25 for ; Fri, 12 Sep 2014 07:01:25 -0700 (PDT) Received-SPF: none (google.com: linux-acpi-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 S1755025AbaILOBO (ORCPT + 7 others); Fri, 12 Sep 2014 10:01:14 -0400 Received: from mail-pd0-f182.google.com ([209.85.192.182]:40122 "EHLO mail-pd0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754995AbaILOBK (ORCPT ); Fri, 12 Sep 2014 10:01:10 -0400 Received: by mail-pd0-f182.google.com with SMTP id w10so1315368pde.27 for ; Fri, 12 Sep 2014 07:01:10 -0700 (PDT) X-Received: by 10.70.129.204 with SMTP id ny12mr13910702pdb.114.1410530470352; Fri, 12 Sep 2014 07:01:10 -0700 (PDT) Received: from localhost ([111.140.73.43]) by mx.google.com with ESMTPSA id xq4sm4203690pac.21.2014.09.12.07.01.09 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 12 Sep 2014 07:01:09 -0700 (PDT) From: Hanjun Guo To: Catalin Marinas , "Rafael J. Wysocki" , Mark Rutland , Olof Johansson , Grant Likely , Will Deacon Cc: Graeme Gregory , Arnd Bergmann , Sudeep Holla , Jon Masters , Jason Cooper , Marc Zyngier , Bjorn Helgaas , Daniel Lezcano , Mark Brown , Rob Herring , Robert Richter , Lv Zheng , Robert Moore , Lorenzo Pieralisi , Liviu Dudau , Randy Dunlap , Charles.Garcia-Tobin@arm.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 v4 05/18] ARM64 / ACPI: Introduce sleep-arm.c Date: Fri, 12 Sep 2014 22:00:03 +0800 Message-Id: <1410530416-30200-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1410530416-30200-1-git-send-email-hanjun.guo@linaro.org> References: <1410530416-30200-1-git-send-email-hanjun.guo@linaro.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-acpi@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.217.177 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. 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 505d4d7..89837f8 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; +}