From patchwork Thu Sep 29 14:22:48 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Guo X-Patchwork-Id: 116962 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 9F653B6F7D for ; Fri, 30 Sep 2011 00:15:28 +1000 (EST) Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R9HOU-0005Qx-PQ; Thu, 29 Sep 2011 14:15:22 +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 1R9HOU-0002gE-Cw; Thu, 29 Sep 2011 14:15:22 +0000 Received: from am1ehsobe002.messaging.microsoft.com ([213.199.154.205] helo=AM1EHSOBE002.bigfish.com) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1R9HOR-0002ft-UV for linux-arm-kernel@lists.infradead.org; Thu, 29 Sep 2011 14:15:21 +0000 Received: from mail105-am1-R.bigfish.com (10.3.201.240) by AM1EHSOBE002.bigfish.com (10.3.204.22) with Microsoft SMTP Server id 14.1.225.22; Thu, 29 Sep 2011 14:15:17 +0000 Received: from mail105-am1 (localhost.localdomain [127.0.0.1]) by mail105-am1-R.bigfish.com (Postfix) with ESMTP id 7D79D179053D; Thu, 29 Sep 2011 14:15:17 +0000 (UTC) X-SpamScore: -9 X-BigFish: VS-9(zz1432N98dKzz1202hzz8275dhz2dh2a8h668h839h944h61h) X-Spam-TCS-SCL: 0:0 X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPVD:NLI; H:mail.freescale.net; RD:none; EFVD:NLI Received: from mail105-am1 (localhost.localdomain [127.0.0.1]) by mail105-am1 (MessageSwitch) id 1317305715697341_22250; Thu, 29 Sep 2011 14:15:15 +0000 (UTC) Received: from AM1EHSMHS002.bigfish.com (unknown [10.3.201.247]) by mail105-am1.bigfish.com (Postfix) with ESMTP id A0BAD12C0053; Thu, 29 Sep 2011 14:15:15 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS002.bigfish.com (10.3.207.102) with Microsoft SMTP Server (TLS) id 14.1.225.22; Thu, 29 Sep 2011 14:12:48 +0000 Received: from az33smr02.freescale.net (10.64.34.200) by 039-SN1MMR1-002.039d.mgd.msft.net (10.84.1.15) with Microsoft SMTP Server id 14.1.323.7; Thu, 29 Sep 2011 09:12:47 -0500 Received: from S2100-06.ap.freescale.net (S2100-06.ap.freescale.net [10.192.242.125]) by az33smr02.freescale.net (8.13.1/8.13.0) with ESMTP id p8TECiWM028548; Thu, 29 Sep 2011 09:12:45 -0500 (CDT) Date: Thu, 29 Sep 2011 22:22:48 +0800 From: Shawn Guo To: Sascha Hauer Subject: Re: [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Message-ID: <20110929142247.GL19318@S2100-06.ap.freescale.net> References: <1317201368-6403-1-git-send-email-shawn.guo@linaro.org> <1317201368-6403-5-git-send-email-shawn.guo@linaro.org> <20110929085936.GD31404@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110929085936.GD31404@pengutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-OriginatorOrg: freescale.com X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110929_101520_234339_1182661D X-CRM114-Status: GOOD ( 32.13 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [213.199.154.205 listed in list.dnswl.org] Cc: Shawn Guo , linux-arm-kernel@lists.infradead.org, patches@linaro.org 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 Thu, Sep 29, 2011 at 10:59:36AM +0200, Sascha Hauer wrote: > On Wed, Sep 28, 2011 at 05:16:06PM +0800, Shawn Guo wrote: > > This patch adds an idle hook imx_idle to be called in arch_idle(). > > Any soc that needs a customized idle implementation other than > > cpu_do_idle() can set up this hook in soc specific call. > > > > Signed-off-by: Shawn Guo > > --- > > arch/arm/mach-imx/mm-imx3.c | 30 ++++++++++++++++++++++++++ > > arch/arm/mach-mx5/mm.c | 6 +++++ > > arch/arm/mach-mx5/pm-imx5.c | 3 +- > > arch/arm/plat-mxc/include/mach/common.h | 2 + > > arch/arm/plat-mxc/include/mach/system.h | 35 ++---------------------------- > > arch/arm/plat-mxc/system.c | 2 + > > 6 files changed, 45 insertions(+), 33 deletions(-) > > > > I had to fold the following into this commit, otherwise we end > up with: > > In file included from arch/arm/mach-mx5/pm-imx5.c:17:0:arch/arm/plat-mxc/include/mach/common.h:77:33: warning: 'enum mxc_cpu_pwr_mode' declared inside parameter list > arch/arm/plat-mxc/include/mach/common.h:77:33: warning: its scope is only this definition or declaration, which is probably not what you want > Aha, I based this series off imx6q one. I have the following change in patch 'arm/imx6q: add suspend/resume support'. But I'm fine with your changes below. > Sascha > > diff --git a/arch/arm/mach-mx5/system.c b/arch/arm/mach-mx5/system.c > index 76ae8dc..144ebeb 100644 > --- a/arch/arm/mach-mx5/system.c > +++ b/arch/arm/mach-mx5/system.c > @@ -13,6 +13,7 @@ > #include > #include > #include > +#include > #include "crm_regs.h" > > /* set cpu low power mode before WFI instruction. This function is called > diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h > index 2b298d8..afaa967 100644 > --- a/arch/arm/plat-mxc/include/mach/common.h > +++ b/arch/arm/plat-mxc/include/mach/common.h > @@ -72,6 +72,15 @@ extern void mxc_arch_reset_init(void __iomem *); > extern void mx51_efikamx_reset(void); > extern int mx53_revision(void); > extern int mx53_display_revision(void); > + > +enum mxc_cpu_pwr_mode { > + WAIT_CLOCKED, /* wfi only */ > + WAIT_UNCLOCKED, /* WAIT */ > + WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ > + STOP_POWER_ON, /* just STOP */ > + STOP_POWER_OFF, /* STOP + SRPG */ > +}; > + > extern void mx5_cpu_lp_set(enum mxc_cpu_pwr_mode mode); > extern void (*imx_idle)(void); > #endif > diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h > index 0987923..00a7819 100644 > --- a/arch/arm/plat-mxc/include/mach/mxc.h > +++ b/arch/arm/plat-mxc/include/mach/mxc.h > @@ -183,13 +183,6 @@ struct cpu_op { > }; > > int tzic_enable_wake(int is_idle); > -enum mxc_cpu_pwr_mode { > - WAIT_CLOCKED, /* wfi only */ > - WAIT_UNCLOCKED, /* WAIT */ > - WAIT_UNCLOCKED_POWER_OFF, /* WAIT + SRPG */ > - STOP_POWER_ON, /* just STOP */ > - STOP_POWER_OFF, /* STOP + SRPG */ > -}; > > extern struct cpu_op *(*get_cpu_op)(int *op); > #endif > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > diff --git a/arch/arm/plat-mxc/include/mach/common.h b/arch/arm/plat-mxc/include/mach/common.h index 571e91d..318b995 100644 --- a/arch/arm/plat-mxc/include/mach/common.h +++ b/arch/arm/plat-mxc/include/mach/common.h @@ -13,6 +13,7 @@ struct platform_device; struct clk; +enum mxc_cpu_pwr_mode; extern void mx1_map_io(void); extern void mx21_map_io(void);