From patchwork Fri Jan 17 12:24:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3503921 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 ED253C02DC for ; Fri, 17 Jan 2014 12:34:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 01BB52015E for ; Fri, 17 Jan 2014 12:34:52 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (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 E10622015D for ; Fri, 17 Jan 2014 12:34:50 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W48dI-0005Ji-5r; Fri, 17 Jan 2014 12:34:44 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W48dF-0007Qx-LL; Fri, 17 Jan 2014 12:34:41 +0000 Received: from mail-pb0-f41.google.com ([209.85.160.41]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W48dC-0007Pp-9M for linux-arm-kernel@lists.infradead.org; Fri, 17 Jan 2014 12:34:38 +0000 Received: by mail-pb0-f41.google.com with SMTP id up15so3548212pbc.0 for ; Fri, 17 Jan 2014 04:34:16 -0800 (PST) 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=XBr8DYc/EBRtywzuC4zp6pwsZ9ODGMCPtOJZ1yL2tYg=; b=RM5EN5SPMRZKGQPO7J3W420radMDPLyvpjtYWMhki2BKYXZ+2ltZzGwPa9O3CIc5Kk PbCdqnQQ7/xBDKwm94ec8Uo7MDOyxvNKVWLRRQZ+aaseACaB4HDrzd2fazqW2VIQrqwg H8LLNVAAgA1h4vkYlnkDKIZxUuHLteaqeyltUVoPYCEll+lIN2PNJp0sLJr5BuavpBo4 XSUY5AFLiW3HaJcZlvyHYeGYWVjy1mUa0of+Wx6QI7VOlIpjNjZccEE+8vHLG8jAGSZv ipCt6B7RFbwIEh18HZChYEDGzk/JiyS7fW+nVMkkS0P5zTjEPSUFqMVQsSsvvfnb0nYl SFgg== X-Gm-Message-State: ALoCoQk9Ef6MTiYP9xAbC0qjDcCObWVg7hPMETzDJfuFwgZ69VN6lzmO45K8Hp1DjYfVCyzSxCsY X-Received: by 10.68.168.162 with SMTP id zx2mr1900975pbb.74.1389962056506; Fri, 17 Jan 2014 04:34:16 -0800 (PST) Received: from localhost ([218.17.215.175]) by mx.google.com with ESMTPSA id lh13sm30268704pab.4.2014.01.17.04.33.32 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Jan 2014 04:34:15 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux Subject: [PATCH 05/20] ARM64 / ACPI: Introduce lowlevel suspend function Date: Fri, 17 Jan 2014 20:24:59 +0800 Message-Id: <1389961514-13562-6-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1389961514-13562-1-git-send-email-hanjun.guo@linaro.org> References: <1389961514-13562-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140117_073438_411035_62935073 X-CRM114-Status: GOOD ( 12.90 ) X-Spam-Score: -1.8 (-) Cc: Mark Rutland , Matthew Garrett , linaro-kernel@lists.linaro.org, Graeme Gregory , Arnd Bergmann , Rob Herring , Linus Walleij , Olof Johansson , linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, Hanjun Guo , patches@linaro.org, Grant Likely , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, 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=-3.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_WEB,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=ham 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 Lowlevel suspend function is needed for ACPI based suspend/resume, introduce ARM related lowlevel function in this patch. 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 908d71b..e108d9c 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -79,6 +79,10 @@ void arch_fix_phys_package_id(int num, u32 slot); /* temperally define -1 to make acpi core compilerable */ #define cpu_physical_id(cpu) -1 +/* Low-level suspend routine. */ +extern int (*acpi_suspend_lowlevel)(void); +#define acpi_wakeup_address (0) + #else /* !CONFIG_ACPI */ #define acpi_disabled 1 /* ACPI sometimes enabled on ARM */ #define acpi_noirq 1 /* ACPI sometimes enabled on ARM */ diff --git a/drivers/acpi/plat/arm-core.c b/drivers/acpi/plat/arm-core.c index 162a1ab..3c8521d 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -207,3 +207,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);