All of lore.kernel.org
 help / color / mirror / Atom feed
From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle()
Date: Thu, 29 Sep 2011 22:22:48 +0800	[thread overview]
Message-ID: <20110929142247.GL19318@S2100-06.ap.freescale.net> (raw)
In-Reply-To: <20110929085936.GD31404@pengutronix.de>

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 <shawn.guo@linaro.org>
> > ---
> >  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'.

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);

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 <linux/platform_device.h>
>  #include <linux/io.h>
>  #include <mach/hardware.h>
> +#include <mach/common.h>
>  #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 at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

-- 
Regards,
Shawn

  reply	other threads:[~2011-09-29 14:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-28  9:16 [PATCH 0/6] Support single zImage for imx3 and imx6 Shawn Guo
2011-09-28  9:16 ` [PATCH 1/6] arm/imx: merge mm-imx35.c into mm-imx31.c Shawn Guo
2011-09-28  9:16 ` [PATCH 2/6] arm/imx: rename mm-imx31.c to mm-imx3.c Shawn Guo
2011-09-28  9:16 ` [PATCH 3/6] arm/imx: change mxc_init_l2x0() to an imx31/35 specific call Shawn Guo
2011-09-28  9:16 ` [PATCH 4/6] arm/imx: remove cpu_is_xxx() from arch_idle() Shawn Guo
2011-09-29  8:59   ` Sascha Hauer
2011-09-29 14:22     ` Shawn Guo [this message]
2011-09-28  9:16 ` [PATCH 5/6] arm/imx: remove cpu_is_xxx() check from __imx_ioremap() Shawn Guo
2011-09-28  9:16 ` [PATCH 6/6] arm/imx: merge i.MX3 and i.MX6 Shawn Guo
2011-09-28 12:18   ` Sascha Hauer
2011-09-29  5:17     ` Shawn Guo
2011-09-29  8:35       ` Sascha Hauer
2011-09-28 12:20 ` [PATCH 0/6] Support single zImage for imx3 and imx6 Sascha Hauer
2011-09-29  5:19   ` Shawn Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110929142247.GL19318@S2100-06.ap.freescale.net \
    --to=shawn.guo@freescale.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.