From patchwork Sun Jan 4 10:55:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 42713 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f71.google.com (mail-ee0-f71.google.com [74.125.83.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0974720A5F for ; Sun, 4 Jan 2015 10:56:23 +0000 (UTC) Received: by mail-ee0-f71.google.com with SMTP id c13sf11428108eek.2 for ; Sun, 04 Jan 2015 02:56:22 -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=3K4Fmqw8P5hc7F7EgZwYqHKGNQYgEpF/KtEJaL5H1aU=; b=WuFu+UBqVa/epmpBCm206qtvSFfuQDLS78kdq9bwCY1JPr8FLu/QHcsJiNvKwVgPf4 ABwTuC7OOSa7nNVk+ij3Y+ihcX3CknmTB2Tu4mi0dWIHmuOrsHfGq3LMya52sHnaHZkO vawH/CZjsuEyMwTH4Pev1LwTER/agGiSItMfpL9Vj+3E/vxvn771bEakQJ5Wee7wNbUH MYG6Utx3WYZumvfoZlMNuJRJu8s0brcfFEKSMe9OyaDTunomCW9jnxnUR+sac1x8F6O3 v3t6rTDo0gkmjhT3CkyYMOy/inOnGxvrblYSvqcIpw/qUJJnN3Au0oTTc3YHS0gfwklE naKA== X-Gm-Message-State: ALoCoQn6U9R81r3KuGRP/qOwSYOY8aMcqB/1RhV3Bgdll8jftg3bCgwXqAD470IClArKq1xrLxeg X-Received: by 10.180.98.165 with SMTP id ej5mr1233034wib.1.1420368982226; Sun, 04 Jan 2015 02:56:22 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.133 with SMTP id o5ls1626300lal.78.gmail; Sun, 04 Jan 2015 02:56:22 -0800 (PST) X-Received: by 10.152.44.167 with SMTP id f7mr76400760lam.92.1420368982039; Sun, 04 Jan 2015 02:56:22 -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 oq1si55556785lbb.98.2015.01.04.02.56.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 04 Jan 2015 02:56:22 -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 mail-la0-f43.google.com with SMTP id s18so16872609lam.2 for ; Sun, 04 Jan 2015 02:56:22 -0800 (PST) X-Received: by 10.112.89.232 with SMTP id br8mr47133815lbb.69.1420368981945; Sun, 04 Jan 2015 02:56:21 -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 c8csp619051lbb; Sun, 4 Jan 2015 02:56:21 -0800 (PST) X-Received: by 10.70.89.207 with SMTP id bq15mr135404056pdb.68.1420368979344; Sun, 04 Jan 2015 02:56:19 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hw8si28406987pbc.148.2015.01.04.02.56.18; Sun, 04 Jan 2015 02:56:19 -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 S1752850AbbADK4D (ORCPT + 27 others); Sun, 4 Jan 2015 05:56:03 -0500 Received: from mail-pd0-f175.google.com ([209.85.192.175]:46226 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752834AbbADKz6 (ORCPT ); Sun, 4 Jan 2015 05:55:58 -0500 Received: by mail-pd0-f175.google.com with SMTP id g10so26164785pdj.6 for ; Sun, 04 Jan 2015 02:55:58 -0800 (PST) X-Received: by 10.70.124.200 with SMTP id mk8mr138457694pdb.147.1420368958213; Sun, 04 Jan 2015 02:55:58 -0800 (PST) Received: from localhost ([180.150.148.224]) by mx.google.com with ESMTPSA id pr3sm50946852pbb.37.2015.01.04.02.55.57 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 04 Jan 2015 02:55:57 -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, 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 v6 04/17] ARM64 / ACPI: Introduce sleep-arm.c Date: Sun, 4 Jan 2015 18:55:05 +0800 Message-Id: <1420368918-5086-5-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1420368918-5086-1-git-send-email-hanjun.guo@linaro.org> References: <1420368918-5086-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 managment, so introduce sleep-arm.c to allow other drivers to function until S states are defined. Tested-by: Suravee Suthikulpanit 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; +}