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: 21980 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f70.google.com (mail-oa0-f70.google.com [209.85.219.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A0735202AE for ; Tue, 3 Dec 2013 16:38:47 +0000 (UTC) Received: by mail-oa0-f70.google.com with SMTP id m1sf48735533oag.1 for ; Tue, 03 Dec 2013 08:38:47 -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:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=HUbzYy+U6ttB9kNmxHx1TB94Fieu5keBOE+whz1uftA=; b=F9pg/Z2QIp+OcsLkYNoXM7g4rlHCKGc1vS/+IiVXFsU4bsjkS7kOZcQ6/gOQmcq7H1 ot/p1UORpbZS7XOBBxKbxlWRKpWLJZnVb6s9Cx+FErJP5mR0yc91cXv6rpEqg8nlDx02 r2QMQjtDCBCGZRB/3o4SsVD7JHIq36KO7Hx7hjntfoWdfrNMjHaOdcEEPjuX2K1xQhit xizm7XvQFb1ycWJ8ckFT+qqtbPhwlrns3yOOxq6IQDhDbC7MuK6vHUveP+bHV3yCd0qD M4YMEqx7yAbQKKdS3mf2r7HxAJA7SnB5/09Xp896a0UTHWueIMWUHj/8w29i4Na5h2mU 3WEQ== X-Gm-Message-State: ALoCoQl2oFxP3+Hc5ohWM0DNUiyHbYALGYbigGwYxGKKDaKp39b3emsRfbCYkLNDBakd30KFrR/K X-Received: by 10.43.152.202 with SMTP id kx10mr21960843icc.3.1386088727073; Tue, 03 Dec 2013 08:38:47 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.82.193 with SMTP id k1ls5598318qey.89.gmail; Tue, 03 Dec 2013 08:38:46 -0800 (PST) X-Received: by 10.220.253.66 with SMTP id mz2mr57417636vcb.10.1386088726819; Tue, 03 Dec 2013 08:38:46 -0800 (PST) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id j3si31556388vcf.114.2013.12.03.08.38.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:46 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id pa12so10753812veb.30 for ; Tue, 03 Dec 2013 08:38:46 -0800 (PST) X-Received: by 10.52.163.165 with SMTP id yj5mr1676412vdb.42.1386088726634; Tue, 03 Dec 2013 08:38:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp222458vcz; Tue, 3 Dec 2013 08:38:46 -0800 (PST) X-Received: by 10.66.65.134 with SMTP id x6mr12280686pas.142.1386088725651; Tue, 03 Dec 2013 08:38:45 -0800 (PST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mx.google.com with ESMTPS id dn2si20720685pbc.243.2013.12.03.08.38.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Dec 2013 08:38:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.192.170 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.192.170; Received: by mail-pd0-f170.google.com with SMTP id g10so20495767pdj.29 for ; Tue, 03 Dec 2013 08:38:45 -0800 (PST) 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 Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Grant Likely , Matthew Garrett , Olof Johansson , Linus Walleij , Bjorn Helgaas , Rob Herring , Mark Rutland , Jon Masters , patches@linaro.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org, Hanjun Guo , Graeme Gregory 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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: hanjun.guo@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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);