From patchwork Fri Oct 7 05:59:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Miao X-Patchwork-Id: 118203 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:4978:20e::2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7A3B6B71AB for ; Fri, 7 Oct 2011 17:00:16 +1100 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RC3Tc-000358-2a; Fri, 07 Oct 2011 06:00:08 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1RC3Ta-0001OJ-0d; Fri, 07 Oct 2011 06:00:06 +0000 Received: from mail-vx0-f177.google.com ([209.85.220.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RC3TW-0001Nw-Op for linux-arm-kernel@lists.infradead.org; Fri, 07 Oct 2011 06:00:03 +0000 Received: by vcbfo1 with SMTP id fo1so3881494vcb.36 for ; Thu, 06 Oct 2011 23:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=wGKdhmzbyccVFAWQZZuVv+i+MAdsKYRLBYF0PsXcKEo=; b=dYOifNHyK7XXWqR+jcdn0hUSlq4pIDQR8PCcWRCGI7EdlOjIMP+EXMCsDXaOwoPtsO MczSJrD3gL71hhppo0y8dHDBqGn52D+tf7Dj3phDqU/+NO2xG5f3eOaL11DOis0MYjFN RSXxzf9G4NzX802FjQfm1WaLvklvFrHoNH7e0= Received: by 10.52.23.106 with SMTP id l10mr1138148vdf.127.1317967200106; Thu, 06 Oct 2011 23:00:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.109.198 with HTTP; Thu, 6 Oct 2011 22:59:40 -0700 (PDT) In-Reply-To: <1317499438-14058-9-git-send-email-arnd@arndb.de> References: <1317499438-14058-1-git-send-email-arnd@arndb.de> <1317499438-14058-9-git-send-email-arnd@arndb.de> From: Eric Miao Date: Fri, 7 Oct 2011 13:59:40 +0800 Message-ID: Subject: Re: [PATCH 08/26] ARM: pxa: move z2 to generic cpu_suspend To: Arnd Bergmann X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20111007_020002_932810_27BEAC61 X-CRM114-Status: GOOD ( 21.32 ) X-Spam-Score: -0.8 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.220.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (eric.y.miao[at]gmail.com) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Jason Chagas , Russell King - ARM Linux , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Haojian Zhuang X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org On Sun, Oct 2, 2011 at 4:03 AM, Arnd Bergmann wrote: > The cpu_suspend code on pxa has recently changed, and the > z2 board did not get updated yet. This makes it do the > same as the other boards. > > Signed-off-by: Arnd Bergmann > --- >  arch/arm/mach-pxa/z2.c |    3 ++- >  1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c > index 6c9275a..109447b 100644 > --- a/arch/arm/mach-pxa/z2.c > +++ b/arch/arm/mach-pxa/z2.c > @@ -31,6 +31,7 @@ >  #include >  #include > > +#include >  #include >  #include > > @@ -686,7 +687,7 @@ static void z2_power_off(void) >         */ >        PSPR = 0x0; >        local_irq_disable(); > -       pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP, PLAT_PHYS_OFFSET - PAGE_OFFSET); > +       cpu_suspend(PWRMODE_DEEPSLEEP, pxa27x_finish_suspend); >  } >  #else >  #define z2_power_off   NULL > -- > 1.7.5.4 > This might not be the safest way to convert. I've proposed a patch weeks ago as below: commit 3f7961cbd3428c8639d42d1a51870466e4cbb0eb Author: Eric Miao Date: Sun Sep 11 17:19:11 2011 +0800 ARM: pxa/z2: fix building error of pxa27x_cpu_suspend() no longer available Cc: Vasily Khoruzhick Signed-off-by: Eric Miao > diff --git a/arch/arm/mach-pxa/z2.c b/arch/arm/mach-pxa/z2.c index 6c9275a..6fa4e74 100644 --- a/arch/arm/mach-pxa/z2.c +++ b/arch/arm/mach-pxa/z2.c @@ -679,6 +679,8 @@ static inline void z2_pmic_init(void) {} #endif #ifdef CONFIG_PM +extern void pxa27x_cpu_pm_enter(suspend_state_t state); + static void z2_power_off(void) { /* We're using deep sleep as poweroff, so clear PSPR to ensure that @@ -686,7 +688,8 @@ static void z2_power_off(void) */ PSPR = 0x0; local_irq_disable(); - pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP, PLAT_PHYS_OFFSET - PAGE_OFFSET); + pxa27x_set_pwrmode(PWRMODE_DEEPSLEEP); + pxa27x_cpu_pm_enter(PM_SUSPEND_MEM); } #else #define z2_power_off NULL