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: 23322 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BFC1420540 for ; Fri, 17 Jan 2014 12:34:18 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id q3sf6271909gge.0 for ; Fri, 17 Jan 2014 04:34:18 -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=XBr8DYc/EBRtywzuC4zp6pwsZ9ODGMCPtOJZ1yL2tYg=; b=Q6hoEWxpRfEIKvIM/5SDnsPzzkw0gTFbTQy20CRIw9Tuqs7I0QkD4/GiasPdSVljx/ tvnO85BvvoNiIx2leQSrJA+rIOOAdKtKrjA8Cm7s0udGeW+STzO0bcjsR23vuJ7Yrzby Y1JACKOUJ7r0YK+05LDVbaNHdyzqIj9WQJxQaQXlG6spxWAnNt1n/6oHiagbdMaQogme 6YnwrqVxf33ptFeQw/p9gkcRojTxkpNsF8LiuyRRNrIykDWVUjnNpLXqouWdwC0IkUaQ UKlxm2uBJkmhNOZ7rV2BDO4gWXTddsBV/F82WUej5D9vnIeHORIDydwTugfi0ngdZKzR ekqQ== X-Gm-Message-State: ALoCoQkRHOIQPQv05GVTQu0mQ3c8eD1rF9TEOYCLMQ/EfSzY+PaHLW8+20YU1n8Q3yITesyniXip X-Received: by 10.58.230.72 with SMTP id sw8mr484978vec.5.1389962057986; Fri, 17 Jan 2014 04:34:17 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.117.103 with SMTP id kd7ls681441qeb.9.gmail; Fri, 17 Jan 2014 04:34:17 -0800 (PST) X-Received: by 10.220.133.148 with SMTP id f20mr831706vct.2.1389962057879; Fri, 17 Jan 2014 04:34:17 -0800 (PST) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id b2si4856357vcy.10.2014.01.17.04.34.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 04:34:17 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.175 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.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so1542983veb.20 for ; Fri, 17 Jan 2014 04:34:17 -0800 (PST) X-Received: by 10.58.181.71 with SMTP id du7mr779869vec.25.1389962057806; Fri, 17 Jan 2014 04:34:17 -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.59.13.131 with SMTP id ey3csp16250ved; Fri, 17 Jan 2014 04:34:17 -0800 (PST) X-Received: by 10.68.254.164 with SMTP id aj4mr1699115pbd.161.1389962056885; Fri, 17 Jan 2014 04:34:16 -0800 (PST) Received: from mail-pb0-f51.google.com (mail-pb0-f51.google.com [209.85.160.51]) by mx.google.com with ESMTPS id ek3si9993103pbd.355.2014.01.17.04.34.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Jan 2014 04:34:16 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.51 is neither permitted nor denied by best guess record for domain of hanjun.guo@linaro.org) client-ip=209.85.160.51; Received: by mail-pb0-f51.google.com with SMTP id un15so367560pbc.10 for ; Fri, 17 Jan 2014 04:34:16 -0800 (PST) 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 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 , Arnd Bergmann , patches@linaro.org, linux-kernel@vger.kernel.org, linaro-kernel@lists.linaro.org, linaro-acpi@lists.linaro.org, Charles.Garcia-Tobin@arm.com, Hanjun Guo , Graeme Gregory 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-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.175 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 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);