From patchwork Fri Oct 17 13:37:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 38862 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f70.google.com (mail-ee0-f70.google.com [74.125.83.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A55D02054E for ; Fri, 17 Oct 2014 13:38:54 +0000 (UTC) Received: by mail-ee0-f70.google.com with SMTP id c13sf570559eek.5 for ; Fri, 17 Oct 2014 06:38:53 -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=jdKjd3boNHL8zR04PpbuTxW4mgLdzQiigJmircFi+48=; b=Va8GIeruecxrtggji7R2CXNUpcQaB4Y8GOnY9IfrZWW681EzW6GDQt4nWo+AJsokqo xfiiBtjzvz2Oq4jO/DaTjTct0oBC2iL4wOht8W8ssEiDIu+XVJi4UWZHPaQ7RFbutUw+ shJFIUCCnF+P7q9LoOQO30ZloxqtpiYqWvn1t+KQLax3pfuRNDZZf/rYG2h3PE5RQCxA EeObO3Ti5TkpL135rRA0uJnmVRjjEIozGe+E6kWV0cxPcnnEBEYQXSoWy+QmsrsdMhsI SexDdb4b4T7WPdpopPdybVxj3OUYM9JsGBros4Mf7yCK3Cr4iBzXHcEzWP5uqxQi3LPN V0ow== X-Gm-Message-State: ALoCoQnjJ4hm9Uz6waT9ppLstjbwCc2pjAWxJQAtDL5QQZaOK33+GO2aOp/6KPEt7W5OngSfkZV9 X-Received: by 10.112.154.194 with SMTP id vq2mr485531lbb.10.1413553133452; Fri, 17 Oct 2014 06:38:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.207 with SMTP id jq15ls295607lab.49.gmail; Fri, 17 Oct 2014 06:38:53 -0700 (PDT) X-Received: by 10.112.221.197 with SMTP id qg5mr8890060lbc.32.1413553133140; Fri, 17 Oct 2014 06:38:53 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id cr6si2070139lad.105.2014.10.17.06.38.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Oct 2014 06:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id b6so704566lbj.3 for ; Fri, 17 Oct 2014 06:38:52 -0700 (PDT) X-Received: by 10.112.77.74 with SMTP id q10mr641976lbw.66.1413553132718; Fri, 17 Oct 2014 06:38:52 -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.84.229 with SMTP id c5csp228298lbz; Fri, 17 Oct 2014 06:38:51 -0700 (PDT) X-Received: by 10.70.90.108 with SMTP id bv12mr1786422pdb.158.1413553131091; Fri, 17 Oct 2014 06:38:51 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id wz2si1194931pab.115.2014.10.17.06.38.48 for ; Fri, 17 Oct 2014 06:38:51 -0700 (PDT) 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 S1753284AbaJQNio (ORCPT + 27 others); Fri, 17 Oct 2014 09:38:44 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:47404 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753177AbaJQNil (ORCPT ); Fri, 17 Oct 2014 09:38:41 -0400 Received: by mail-pd0-f175.google.com with SMTP id v10so823795pde.6 for ; Fri, 17 Oct 2014 06:38:41 -0700 (PDT) X-Received: by 10.66.140.76 with SMTP id re12mr2270350pab.147.1413553121025; Fri, 17 Oct 2014 06:38:41 -0700 (PDT) Received: from localhost ([220.202.153.90]) by mx.google.com with ESMTPSA id db7sm1645716pdb.27.2014.10.17.06.38.36 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Oct 2014 06:38:40 -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, Kangkang.Shen@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 v5 05/18] ARM64 / ACPI: Introduce sleep-arm.c Date: Fri, 17 Oct 2014 21:37:01 +0800 Message-Id: <1413553034-20956-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1413553034-20956-1-git-send-email-hanjun.guo@linaro.org> References: <1413553034-20956-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.217.172 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; +}