From patchwork Fri Apr 25 13:20:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 4062521 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1B32DBFF02 for ; Fri, 25 Apr 2014 13:26:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 92E7520381 for ; Fri, 25 Apr 2014 13:26:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B3A982037F for ; Fri, 25 Apr 2014 13:26:09 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wdg6J-0007pQ-Qv; Fri, 25 Apr 2014 13:23:35 +0000 Received: from mail-pa0-f54.google.com ([209.85.220.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Wdg6E-0007Wz-MU for linux-arm-kernel@lists.infradead.org; Fri, 25 Apr 2014 13:23:30 +0000 Received: by mail-pa0-f54.google.com with SMTP id lf10so3174803pab.13 for ; Fri, 25 Apr 2014 06:23:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=TuhZ0QUbB8gk42SH0qKr6NQy9hQ1fV56xuXReWtwums=; b=mDlk3cjrptFGZzLICVTgWiQNaGqwj4DDRROX12moCPtJGd7og4AOwdO3lJan9CTFhV Ch0eNWKPPaROYXOlUT3L9tvrXCdH5TJWgWgcu3DfT0v8gfhRUFAP0qOiDOJuZJSMiQEl prcdIgtBLt7gc3ht9J2dUcpXdq+LUckqvJBLGcg+kmanlbHjOd1JvaPhMa96K+PsaCWq J+NhBBPiziDdLWqtXVTmki66qqYdxToF1XfETGyQZXU4dAPx5hxi2x0b/Aw+WJ5y0nvn NnvBaP5j0ynYflOD0DbTs4P9Ye/uoOXv6bmNSYnZfGH7T2uvHNUxymdg7637RH7uNXDw zTYg== X-Gm-Message-State: ALoCoQkKMDhDjZ4GXuBTqDYnZWzCNKgaDeyg79K+4LR/kYmbNGkxhQnYszYUcM0B0EEClMOLVHFj X-Received: by 10.68.201.97 with SMTP id jz1mr11451204pbc.26.1398432188681; Fri, 25 Apr 2014 06:23:08 -0700 (PDT) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id ba3sm149563pbb.10.2014.04.25.06.22.58 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 25 Apr 2014 06:23:08 -0700 (PDT) From: Hanjun Guo To: linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org Subject: [PATCH v3 part1 06/11] ARM64 / ACPI: Introduce lowlevel suspend function Date: Fri, 25 Apr 2014 21:20:12 +0800 Message-Id: <1398432017-8506-7-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398432017-8506-1-git-send-email-hanjun.guo@linaro.org> References: <1398432017-8506-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140425_062330_752309_6A920D0A X-CRM114-Status: GOOD ( 10.82 ) X-Spam-Score: -0.1 (/) Cc: Mark Rutland , Rob Herring , Graeme Gregory , Arnd Bergmann , Mark Brown , Catalin Marinas , linaro-acpi@lists.linaro.org, "Rafael J. Wysocki" , Will Deacon , Olof Johansson , Hanjun Guo , Sudeep Holla , Grant Likely , Charles.Garcia-Tobin@arm.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, RCVD_IN_SORBS_WEB, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP acpi_wakeup_address is used on x86 as the address bios jumps into when machine wakes up from suspend. As arm64 does not have such a bios this mechanism will be provided by other means. But the define is still required inside the acpi core. Introduce a null stub for acpi_suspend_lowlevel as this is also required by core. This will be filled in when standards are defined for arm64 ACPI global power states. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 4 ++++ drivers/acpi/plat/arm-core.c | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 3ac9dfb..60e3a72 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -85,6 +85,10 @@ static inline void acpi_disable_pci(void) */ #define cpu_physical_id(cpu) -1 +/* Low-level suspend routine. */ +extern int (*acpi_suspend_lowlevel)(void); +#define acpi_wakeup_address (0) + #endif /* CONFIG_ACPI */ #endif /*_ASM_ACPI_H*/ diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index e4846fd..aeea64e 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -129,3 +129,10 @@ static int __init parse_acpi(char *arg) return 0; } early_param("acpi", parse_acpi); + +/* + * acpi_suspend_lowlevel() - save kernel state and suspend. + * + * TBD when ARM/ARM64 starts to support suspend... + */ +int (*acpi_suspend_lowlevel)(void);