Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-20 Thread Yong Shen
Hi Sascha, I had sent out v3 patch before the your last comments. I noticed how davinci is doing, but some SOCs like omap, they also do it in another way like my code. However, if you prefer the way davinci is doing, I will redo it. Please confirm. thanks Yong On Thu, Feb 17, 2011 at 11:54 AM, S

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-17 Thread Sascha Hauer
On Thu, Feb 17, 2011 at 09:18:11AM +0100, Yong Shen wrote: > > > > > > > + return 0; > > > +} > > > + > > > +late_initcall(imx_cpuidle_init); > > > > We have a late_initcall here which needs to be protected from other > > cpus. On the other hand we depend on board code calling > > imx_cpuidle_b

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-17 Thread Yong Shen
> > > > + return 0; > > +} > > + > > +late_initcall(imx_cpuidle_init); > > We have a late_initcall here which needs to be protected from other > cpus. On the other hand we depend on board code calling > imx_cpuidle_board_params() before this initcall. I think the board code > should call a imx_

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-16 Thread Yong Shen
On Wed, Feb 16, 2011 at 10:13 AM, Sascha Hauer wrote: > On Wed, Feb 16, 2011 at 09:37:47AM +0100, Yong Shen wrote: > > Hi Sascha, > > > > > > > > + local_irq_disable(); > > > > + do_gettimeofday(&before); > > > > + > > > > + plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & > > > > +

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-16 Thread Sascha Hauer
On Fri, Feb 11, 2011 at 10:36:12AM +0100, yong.s...@linaro.org wrote: > From: Yong Shen > > implement cpuidle driver for iMX5 SOCs, leave cpuidle params to board > related code. > > Signed-off-by: Yong Shen > --- > arch/arm/mach-mx5/Makefile |1 + > arch/arm/mach-mx5/cpuidle.c | 113 > +

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-16 Thread Sascha Hauer
On Wed, Feb 16, 2011 at 09:37:47AM +0100, Yong Shen wrote: > Hi Sascha, > > > > > + local_irq_disable(); > > > + do_gettimeofday(&before); > > > + > > > + plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & > > > + ~(MXC_CORTEXA8_PLAT_LPC_DSM); > > > > One thing that strikes me he

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-16 Thread Yong Shen
Hi Sascha, > > + local_irq_disable(); > > + do_gettimeofday(&before); > > + > > + plat_lpc = __raw_readl(MXC_CORTEXA8_PLAT_LPC) & > > + ~(MXC_CORTEXA8_PLAT_LPC_DSM); > > One thing that strikes me here is the fact that this code can probably > run on i.MX53 aswell, right? It's

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-16 Thread Yong Shen
Hi Sascha, On Tue, Feb 15, 2011 at 7:27 PM, Sascha Hauer wrote: > On Fri, Feb 11, 2011 at 10:36:12AM +0100, yong.s...@linaro.org wrote: > > From: Yong Shen > > > > implement cpuidle driver for iMX5 SOCs, leave cpuidle params to board > > related code. > > > > Signed-off-by: Yong Shen > > --- >

Re: [PATCH v2 1/2] ARM: IMX5: cpuidle driver

2011-02-15 Thread Sascha Hauer
On Fri, Feb 11, 2011 at 10:36:12AM +0100, yong.s...@linaro.org wrote: > From: Yong Shen > > implement cpuidle driver for iMX5 SOCs, leave cpuidle params to board > related code. > > Signed-off-by: Yong Shen > --- > arch/arm/mach-mx5/Makefile |1 + > arch/arm/mach-mx5/cpuidle.c | 113 > +