From patchwork Tue Dec 3 16:36:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 3277661 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 B1161C0D4A for ; Tue, 3 Dec 2013 16:41:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1C26020386 for ; Tue, 3 Dec 2013 16:41:21 +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 5FEA12015E for ; Tue, 3 Dec 2013 16:41:16 +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 1Vnt0j-0005WL-29; Tue, 03 Dec 2013 16:39:46 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnt0A-0000xr-2P; Tue, 03 Dec 2013 16:39:10 +0000 Received: from mail-pd0-f181.google.com ([209.85.192.181]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vnt04-0000uS-FD for linux-arm-kernel@lists.infradead.org; Tue, 03 Dec 2013 16:39:06 +0000 Received: by mail-pd0-f181.google.com with SMTP id p10so20208897pdj.26 for ; Tue, 03 Dec 2013 08:38:45 -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=HUbzYy+U6ttB9kNmxHx1TB94Fieu5keBOE+whz1uftA=; b=JzKkrsWgJq4zUey4ewjcdewtdhTQnpGFWCWzZyOeD2tPnN/Q0XwJVCJnLhiSCQCRLc cTpUiAoeydnmkcmYs0mTuyJYBXgOOSIoytszCDQcjHWvnnV5nbzgt3X1x24e9oRBC6gE +x7waa6FNiAlS/AMJXxfG0YUtK1Ah7AKoQacCsRNV235Fl0e8UPetyjnaQduwPT8ZsJ4 bHrEk1Lc9dFZECukUf9z5sUa/thXCyTC7OmIJOPYRwisLzkss/poDMsU4mM2mLWPw/zh wk3XoA4L7u/8FEllPt720V9Hh2RzCpKBwTpASMSPIXRc/UpnIKOqW+1BeUuF1mIKxPqr nbJQ== X-Gm-Message-State: ALoCoQnxstmLSMOQ+wwPPeoEj6J1gWwSHGpGsEUBlyDGqkB1iCJ5w9t0iawhR96axUk8v1cQhfZh X-Received: by 10.66.162.136 with SMTP id ya8mr75098390pab.110.1386088724145; Tue, 03 Dec 2013 08:38:44 -0800 (PST) Received: from localhost ([61.148.199.138]) by mx.google.com with ESMTPSA id oj6sm148860317pab.9.2013.12.03.08.38.37 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:43 -0800 (PST) From: Hanjun Guo To: "Rafael J. Wysocki" , Catalin Marinas , Will Deacon , Russell King - ARM Linux , Daniel Lezcano Subject: [RFC part1 PATCH 6/7] ARM64 / ACPI: Introduce lowlevel suspend function Date: Wed, 4 Dec 2013 00:36:50 +0800 Message-Id: <1386088611-2801-7-git-send-email-hanjun.guo@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1386088611-2801-1-git-send-email-hanjun.guo@linaro.org> References: <1386088611-2801-1-git-send-email-hanjun.guo@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131203_113904_657430_AE65E55C X-CRM114-Status: GOOD ( 12.59 ) X-Spam-Score: -1.9 (-) Cc: Mark Rutland , Matthew Garrett , linaro-kernel@lists.linaro.org, Graeme Gregory , patches@linaro.org, Linus Walleij , Olof Johansson , linux-kernel@vger.kernel.org, Rob Herring , linaro-acpi@lists.linaro.org, linux-acpi@vger.kernel.org, Jon Masters , Grant Likely , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Hanjun Guo 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=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 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 e9444e4..c830adc 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 7b8e64a..2b6df56 100644 --- a/drivers/acpi/plat/arm-core.c +++ b/drivers/acpi/plat/arm-core.c @@ -217,3 +217,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 when ARM/ARM64 starts to support suspend... + */ +int (*acpi_suspend_lowlevel)(void);