Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Yong Shen
> > Using wp_tbl is because that it also contains information like regulator > > voltage. > > The clock code does not handle the regulators, not even in the fsl > kernel. > I did not mean to say clock code will handle regulators. I mean this table also contains such information which may be needed

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Amit Kucheria
On Thu, Oct 7, 2010 at 2:33 PM, Yong Shen wrote: > >> >  # Object file lists. >> > -obj-y   := cpu.o mm.o clock-mx51.o devices.o >> > +obj-y   := cpu.o mm.o clock-mx51.o devices.o cpu_wp-mx51.o >> >> By hardcoding cpu_wp-mx51 here, you are making the assumption that even if >> cpufreq is turned of

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Yong Shen
> > # Object file lists. > > -obj-y := cpu.o mm.o clock-mx51.o devices.o > > +obj-y := cpu.o mm.o clock-mx51.o devices.o cpu_wp-mx51.o > > By hardcoding cpu_wp-mx51 here, you are making the assumption that even if > cpufreq is turned off, you'll still need the entire WP table to set the > cpu

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Sascha Hauer
On Thu, Oct 07, 2010 at 10:40:44AM +0300, Amit Kucheria wrote: > On 10 Oct 07, Yong Shen wrote: > > > > > > +static struct cpufreq_frequency_table imx_freq_table[4]; > > > > > > Three frequencies should be enough for everyone, right? This should be > > > dynamically allocated like in other cpufreq

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Sascha Hauer
On Thu, Oct 07, 2010 at 11:36:07AM +0800, Yong Shen wrote: > Hi Sascha, > > Thanks for your thorough comments. > I have already received comments from Arnd before yours arrived. So some of > the commends you two provided are common. > I acknowledge most of your opinions, except for two, I have som

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Amit Kucheria
Some comments inline. On 10 Oct 07, Yong Shen wrote: > From: Yong Shen > > it is tested on babbage 3.0 > > Signed-off-by: Yong Shen > --- > arch/arm/Kconfig |6 + > arch/arm/mach-mx5/Kconfig |1 + > arch/arm/mach-mx5/Makefile |2 +- >

Re: [PATCH] cpufreq for freescale mx51

2010-10-07 Thread Amit Kucheria
On 10 Oct 07, Yong Shen wrote: > > > > +static struct cpufreq_frequency_table imx_freq_table[4]; > > > > Three frequencies should be enough for everyone, right? This should be > > dynamically allocated like in other cpufreq drivers. > > > > Yes, we only support 3 work points, which is for sure. A

[PATCH] cpufreq for freescale mx51

2010-10-06 Thread yong . shen
From: Yong Shen it is tested on babbage 3.0 Signed-off-by: Yong Shen --- arch/arm/Kconfig |6 + arch/arm/mach-mx5/Kconfig |1 + arch/arm/mach-mx5/Makefile |2 +- arch/arm/mach-mx5/board-mx51_babbage.c | 10 ++- arch/arm/mach-mx5/cloc

Re: [PATCH] cpufreq for freescale mx51

2010-10-06 Thread Yong Shen
> I still disagree, but it's not important. IMHO most of the uses of > __raw_readl should be converted to readl or readl_relaxed if you are > worried about efficiency. > > The main difference between __raw_readl and readl_relaxed is that the > endianess is well-defined on readl_relaxed. > >

Re: [PATCH] cpufreq for freescale mx51

2010-10-06 Thread Yong Shen
Hi Sascha, Thanks for your thorough comments. I have already received comments from Arnd before yours arrived. So some of the commends you two provided are common. I acknowledge most of your opinions, except for two, I have some explanations. > > +*/ > > > + reg = __raw_readl(MXC_CCM_CACRR)

Re: [PATCH] cpufreq for freescale mx51

2010-10-06 Thread Sascha Hauer
On Thu, Sep 30, 2010 at 01:48:17PM +0300, Amit Kucheria wrote: > Add'ed linaro-dev and linux-arm-kernel to CC. > > Thanks Yong, some feeback follows inline. > > On 10 Sep 29, Yong Shen wrote: > > From: Yong Shen > > > > --- > > arch/arm/Kconfig |6 + > > arch/arm/mach

Re: [PATCH] cpufreq for freescale mx51

2010-10-06 Thread Arnd Bergmann
On Wednesday 06 October 2010, Yong Shen wrote: > Hi Arnd, > > Really appreciate your valuable comments. Most of them are accepted. I have > different option about two comments. > 1. > > > It would be better to make this code a proper device driver, > > probably a platform_driver unless you have a

Re: [PATCH] cpufreq for freescale mx51

2010-10-05 Thread Yong Shen
Hi Arnd, Really appreciate your valuable comments. Most of them are accepted. I have different option about two comments. 1. > It would be better to make this code a proper device driver, > probably a platform_driver unless you have a way to probe > the presence of the registers on another bus. >

Re: [PATCH] cpufreq for freescale mx51

2010-10-05 Thread Arnd Bergmann
> From: Yong Shen > > it is tested on babbage 3.0 One big comment and a couple of smaller ones: It would be better to make this code a proper device driver, probably a platform_driver unless you have a way to probe the presence of the registers on another bus. Making it a driver that registers

[PATCH] cpufreq for freescale mx51

2010-10-05 Thread yong . shen
From: Yong Shen it is tested on babbage 3.0 Signed-off-by: Yong Shen --- arch/arm/Kconfig |6 + arch/arm/mach-mx5/Kconfig |1 + arch/arm/mach-mx5/Makefile |2 +- arch/arm/mach-mx5/board-mx51_babbage.c |7 +- arch/arm/mach-mx5/clock

Re: [PATCH] cpufreq for freescale mx51

2010-10-04 Thread Amit Kucheria
More comments. On Fri, Oct 1, 2010 at 7:06 AM, Yong Shen wrote: > Hi Amit, > > Please see my feedback embedded. > > On Thu, Sep 30, 2010 at 6:48 PM, Amit Kucheria > wrote: [snip] >> > +static int mxc_set_target(struct cpufreq_policy *policy, >> > +                       unsigned int target_fre

Re: [PATCH] cpufreq for freescale mx51

2010-09-30 Thread Yong Shen
Hi Amit, Please see my feedback embedded. On Thu, Sep 30, 2010 at 6:48 PM, Amit Kucheria wrote: > Add'ed linaro-dev and linux-arm-kernel to CC. > > Thanks Yong, some feeback follows inline. > > On 10 Sep 29, Yong Shen wrote: > > From: Yong Shen > > > > --- > > arch/arm/Kconfig

Re: [PATCH] cpufreq for freescale mx51

2010-09-30 Thread Amit Kucheria
Add'ed linaro-dev and linux-arm-kernel to CC. Thanks Yong, some feeback follows inline. On 10 Sep 29, Yong Shen wrote: > From: Yong Shen > > --- > arch/arm/Kconfig |6 + > arch/arm/mach-mx5/Kconfig |1 + > arch/arm/mach-mx5/board-mx51_babbage.c | 32