From patchwork Thu Sep 29 08:59:36 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 4424 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9685923F6E for ; Thu, 29 Sep 2011 08:59:40 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id 8288BA18209 for ; Thu, 29 Sep 2011 08:59:40 +0000 (UTC) Received: by fxe23 with SMTP id 23so2220070fxe.11 for ; Thu, 29 Sep 2011 01:59:40 -0700 (PDT) Received: by 10.223.63.8 with SMTP id z8mr3347311fah.84.1317286779484; Thu, 29 Sep 2011 01:59:39 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.3.234 with SMTP id f10cs8129laf; Thu, 29 Sep 2011 01:59:39 -0700 (PDT) Received: by 10.223.37.18 with SMTP id v18mr16043618fad.98.1317286778438; Thu, 29 Sep 2011 01:59:38 -0700 (PDT) Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de. [92.198.50.35]) by mx.google.com with ESMTPS id z8si499775fam.58.2011.09.29.01.59.38 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Sep 2011 01:59:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of sha@pengutronix.de designates 92.198.50.35 as permitted sender) client-ip=92.198.50.35; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of sha@pengutronix.de designates 92.198.50.35 as permitted sender) smtp.mail=sha@pengutronix.de Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1R9CSv-0008Ib-73; Thu, 29 Sep 2011 10:59:37 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.76) (envelope-from ) id 1R9CSu-0006df-9L; Thu, 29 Sep 2011 10:59:36 +0200 Date: Thu, 29 Sep 2011 10:59:36 +0200 From: Sascha Hauer To: Shawn Guo Cc: linux-arm-kernel@lists.infradead.org, patches@linaro.org Subject: Re: [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Message-ID: <20110929085936.GD31404@pengutronix.de> References: <1317201368-6403-1-git-send-email-shawn.guo@linaro.org> <1317201368-6403-5-git-send-email-shawn.guo@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1317201368-6403-5-git-send-email-shawn.guo@linaro.org> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Uptime: 10:57:40 up 99 days, 14:44, 39 users, load average: 3.14, 4.86, 3.86 User-Agent: Mutt/1.5.21 (2010-09-15) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: patches@linaro.org 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 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