Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-03-03 Thread Richard Zhao
Hi Mike, On Sun, Mar 03, 2013 at 02:54:24AM -0800, Mike Turquette wrote: > Quoting Richard Zhao (2013-03-02 00:22:19) > > On Fri, Mar 01, 2013 at 06:55:54PM -0800, Bill Huang wrote: > > > On Sat, 2013-03-02 at 04:48 +0800, Mike Turquette wrote: > > > > Quoting Mike

Re: [PATCH 2/5] clk: notifier handler for dynamic voltage scaling

2013-03-02 Thread Richard Zhao
On Fri, Mar 01, 2013 at 06:55:54PM -0800, Bill Huang wrote: > On Sat, 2013-03-02 at 04:48 +0800, Mike Turquette wrote: > > Quoting Mike Turquette (2013-03-01 10:22:34) > > > Quoting Bill Huang (2013-03-01 01:41:31) > > > > On Thu, 2013-02-28 at 12:49 +0800, Mike Turquette wrote: > > > > > Dynamic v

Re: [PATCH 0/2] change lpj in arm smp common code

2012-03-31 Thread Richard Zhao
On Wed, Feb 29, 2012 at 10:21:19AM -0800, Kevin Hilman wrote: > Richard Zhao writes: > > > The two patches were originally in [PATCH V6 0/7] add a generic cpufreq > > driver. > > I seperated them and hope they can go to upstream earlier. > > > > Rich

Re: [PATCH v7 3/3] clk: basic clock hardware types

2012-03-16 Thread Richard Zhao
[...] > +static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, > + unsigned long *best_parent_rate) > +{ > + struct clk_divider *divider = to_clk_divider(hw); > + int i, bestdiv = 0; > + unsigned long parent_rate, best = 0, now, maxdiv; > + > + if (!rate)

Re: [PATCH v6 3/3] clk: basic clock hardware types

2012-03-14 Thread Richard Zhao
Hi Mike, > +static int clk_divider_bestdiv(struct clk_hw *hw, unsigned long rate, > + unsigned long *best_parent_rate) > +{ > + struct clk_divider *divider = to_clk_divider(hw); > + int i, bestdiv = 0; > + unsigned long parent_rate, best = 0, now, maxdiv; > + > + maxdiv

Re: [PATCH v6 2/3] clk: introduce the common clock framework

2012-03-10 Thread Richard Zhao
Looks like you didn't take my comments for v5. http://www.spinics.net/lists/arm-kernel/msg162903.html Regards Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

Re: [PATCH v5 0/4] common clk framework

2012-03-08 Thread Richard Zhao
Hello Mike, The main interface for clk implementer is to register clocks dynamically. I think it highly depends on clk DT bindings. From the patch Grant sent out, it looks like he doesn't like one node per clk. So how do we register clocks dynamically? You have any sample code? Thanks Richard _

Re: [PATCH v5 3/4] clk: introduce the common clock framework

2012-03-05 Thread Richard Zhao
Hi Mike, On Sat, Mar 03, 2012 at 12:29:00AM -0800, Mike Turquette wrote: [snip] > +static void __clk_disable(struct clk *clk) > +{ > + if (!clk) > + return; > + > + if (WARN_ON(clk->enable_count == 0)) > + return; > + > + if (--clk->enable_count > 0) > +

Re: [PATCH v5 2/4] clk: Kconfig: add entry for HAVE_CLK_PREPARE

2012-03-04 Thread Richard Zhao
by: Mike Turquette > Acked-by: Shawn Guo > Cc: Jeremy Kerr > Cc: Thomas Gleixner > Cc: Arnd Bergman > Cc: Paul Walmsley > Cc: Richard Zhao > Cc: Saravana Kannan > Cc: Magnus Damm > Cc: Rob Herring > Cc: Mark Brown > Cc: Linus Walleij > Cc: Stephen Boyd > C

[PATCH 1/2] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2012-02-28 Thread Richard Zhao
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao Acked-by: Russell King --- arch/arm/kernel/smp.c | 54 + 1 files changed, 54 insertions

[PATCH 0/2] change lpj in arm smp common code

2012-02-28 Thread Richard Zhao
The two patches were originally in [PATCH V6 0/7] add a generic cpufreq driver. I seperated them and hope they can go to upstream earlier. Richard Zhao (2): ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp cpufreq: OMAP: remove loops_per_jiffy recalculate for smp arch

[PATCH 2/2] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2012-02-28 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- drivers/cpufreq/omap-cpufreq.c | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap

Re: [PATCH V6 4/7] cpufreq: add clk-reg cpufreq driver

2012-01-12 Thread Richard Zhao
On Wed, Jan 11, 2012 at 03:22:34PM -0800, Kevin Hilman wrote: > Richard Zhao writes: > > > The driver get cpu operation point table from device tree cpu0 node, > > Since we already have an existing OPP infrastructure in the kernel, > seems like this driver should get O

Re: [PATCH V6 0/7] add a generic cpufreq driver

2012-01-09 Thread Richard Zhao
On Fri, Jan 06, 2012 at 08:53:37AM +0800, Richard Zhao wrote: > On Thu, Jan 05, 2012 at 06:16:54AM +0800, Richard Zhao wrote: > > hi Russell, > > > > May I have your ACK, you merge it? > Russell, ping would you have time to look at this patch series? >

Re: [PATCH V6 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2012-01-05 Thread Richard Zhao
Hi Kevin, Could you please look at and ack the patch if possible? Sorry, I didn't cc you. Thanks Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

Re: [PATCH V6 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate for smp

2012-01-05 Thread Richard Zhao
Hi Sascha & Shawn, Could you look and ack the patch? Thanks Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

Re: [PATCH V6 0/7] add a generic cpufreq driver

2012-01-05 Thread Richard Zhao
On Thu, Jan 05, 2012 at 06:16:54AM +0800, Richard Zhao wrote: > hi Russell, > > May I have your ACK, you merge it? Russell, ping > > Thanks > Richard > > ___ > linux-arm-kernel mailing list > linux-arm-ker

Re: [PATCH v4 3/6] clk: introduce the common clock framework

2012-01-04 Thread Richard Zhao
On Wed, Jan 04, 2012 at 05:01:43PM -0800, Turquette, Mike wrote: > On Wed, Jan 4, 2012 at 6:32 AM, Rob Herring wrote: > > On 01/03/2012 08:15 PM, Richard Zhao wrote: > >> On Fri, Dec 16, 2011 at 04:45:48PM -0800, Turquette, Mike wrote: > >>> On Wed, Dec 14, 20

Re: [PATCH V6 0/7] add a generic cpufreq driver

2012-01-04 Thread Richard Zhao
hi Russell, May I have your ACK, you merge it? Thanks Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

Re: [PATCH v4 3/6] clk: introduce the common clock framework

2012-01-03 Thread Richard Zhao
On Fri, Dec 16, 2011 at 04:45:48PM -0800, Turquette, Mike wrote: > On Wed, Dec 14, 2011 at 5:18 AM, Thomas Gleixner wrote: > > On Tue, 13 Dec 2011, Mike Turquette wrote: > >> +void __clk_unprepare(struct clk *clk) > >> +{ > >> +     if (!clk) > >> +             return; > >> + > >> +     if (WARN_O

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2012-01-03 Thread Richard Zhao
On 3 January 2012 21:47, Russell King - ARM Linux wrote: > On Tue, Jan 03, 2012 at 09:25:30PM +0800, Richard Zhao wrote: >> Hi Russel, >> >> On 3 January 2012 17:06, Russell King - ARM Linux >> wrote: >> > On Mon, Dec 26, 2011 at 09:44:52PM +0800, Richard Zh

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2012-01-03 Thread Richard Zhao
Hi Russel, On 3 January 2012 17:06, Russell King - ARM Linux wrote: > On Mon, Dec 26, 2011 at 09:44:52PM +0800, Richard Zhao wrote: >> On Mon, Dec 26, 2011 at 11:10:30AM +, Mark Brown wrote: >> > The *call* is there in the regulator subsystem, it's just that none of &

[PATCH V6 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-29 Thread Richard Zhao
The driver get cpu operation point table from device tree cpu0 node, and adjusts operating points using clk and regulator APIs. It support single core and multi-core ARM SoCs. But currently it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao Reviewed-by: Jamie

[PATCH V6 1/7] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2011-12-29 Thread Richard Zhao
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao --- arch/arm/kernel/smp.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff

[PATCH V6 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate for smp

2011-12-29 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/cpufreq.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index c937e75..364793a 100644

[PATCH V6 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2011-12-29 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- drivers/cpufreq/omap-cpufreq.c | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap

[PATCH V6 6/7] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-29 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

[PATCH V6 0/7] add a generic cpufreq driver

2011-12-29 Thread Richard Zhao
The driver is based on clock and regulator APIs and support single core and multi core ARM SoCs. For multi core, it assume all cores share the same clock and voltage. Thanks Arnd, Mark, Jamie, Shawn, Rob, for your review. Changes in V6: - add scaling_available_freqs Changes in V5: - add more

[PATCH V6 7/7] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-29 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

[PATCH V6 5/7] dts/imx6q: add cpufreq property

2011-12-29 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..d89b42d 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-28 Thread Richard Zhao
There's still a bug that, after rmmod module, cpu0 still has cpufreq sysfs entry. cpufreq_unregister_driver can not clean up everything. unfortunately, I don't have much time to debug cpufreq core. Log: root@ubuntu:~# insmod /clk-reg-cpufreq.ko clk_reg_cpufreq: regulator cpu get failed. trying

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-28 Thread Richard Zhao
On Wed, Dec 28, 2011 at 12:14:04PM +, Mark Brown wrote: > On Wed, Dec 28, 2011 at 08:05:20PM +0800, Richard Zhao wrote: > > Looks like the problem with your mail client is that it's wrapping at > exactly 80 characters which is too little - you need to leave space for > bei

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-28 Thread Richard Zhao
On Wed, Dec 28, 2011 at 11:42:37AM +, Mark Brown wrote: > On Wed, Dec 28, 2011 at 11:31:29AM +0800, Richard Zhao wrote: > > On Wed, Dec 28, 2011 at 11:14:10AM +0800, Richard Zhao wrote: > > > > > + if (cpu_reg) { > > &

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-27 Thread Richard Zhao
On Wed, Dec 28, 2011 at 11:14:10AM +0800, Richard Zhao wrote: > Hi Mark, > > [...] > > + if (cpu_reg) { > > + ret = regulator_is_supported_voltage(cpu_reg, > > + cpu_volts[i * 2], cpu_volts[i * 2 + 1]); >

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-27 Thread Richard Zhao
Hi Mark, [...] > + if (cpu_reg) { > + ret = regulator_is_supported_voltage(cpu_reg, > + cpu_volts[i * 2], cpu_volts[i * 2 + 1]); Is there any reason you didn't export symbol regulator_is_supported_voltage? and also it don't have !

Re: [PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-27 Thread Richard Zhao
On Tue, Dec 27, 2011 at 11:05:41PM +0800, Shawn Guo wrote: > Hi Richard, > > On Tue, Dec 27, 2011 at 04:24:19PM +0800, Richard Zhao wrote: > > The driver get cpu operation point table from device tree cpu0 node, > > and adjusts operating points using clk and regulator APIs

[PATCH V5 7/7] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-27 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

[PATCH V5 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-27 Thread Richard Zhao
The driver get cpu operation point table from device tree cpu0 node, and adjusts operating points using clk and regulator APIs. It support single core and multi-core ARM SoCs. But currently it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao Reviewed-by: Jamie

[PATCH V5 1/7] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2011-12-27 Thread Richard Zhao
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao --- arch/arm/kernel/smp.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff

[PATCH V5 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2011-12-27 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- drivers/cpufreq/omap-cpufreq.c | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap

[PATCH V5 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate for smp

2011-12-27 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/cpufreq.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index c937e75..364793a 100644

[PATCH V5 0/7] add a generic cpufreq driver

2011-12-27 Thread Richard Zhao
The driver is based on clock and regulator APIs and support single core and multi core ARM SoCs. For multi core, it assume all cores share the same clock and voltage. Thanks Arnd, Mark, Jamie, Rob, for your review. Changes in V5: - add more comments - rename trans-latency to clk-trans-latency,

[PATCH V5 6/7] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-27 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

[PATCH V5 5/7] dts/imx6q: add cpufreq property

2011-12-27 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..d89b42d 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-26 Thread Richard Zhao
On Mon, Dec 26, 2011 at 02:22:34PM +, Mark Brown wrote: > On Mon, Dec 26, 2011 at 09:44:52PM +0800, Richard Zhao wrote: > > On Mon, Dec 26, 2011 at 11:10:30AM +, Mark Brown wrote: > > Fix your mailer to word wrap properly please. If you mean last mail I sent, I didn'

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-26 Thread Richard Zhao
On Mon, Dec 26, 2011 at 11:10:30AM +, Mark Brown wrote: > On Sat, Dec 24, 2011 at 11:52:29PM +0800, Richard Zhao wrote: > > On Sat, Dec 24, 2011 at 01:42:29PM +, Mark Brown wrote: > > > On Sat, Dec 24, 2011 at 09:28:33PM +0800, Richard Zhao wrote: > > >

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-24 Thread Richard Zhao
On Sat, Dec 24, 2011 at 01:42:29PM +, Mark Brown wrote: > On Sat, Dec 24, 2011 at 09:28:33PM +0800, Richard Zhao wrote: > > On Sat, Dec 24, 2011 at 12:24:11PM +, Mark Brown wrote: > > > - trans-latency : transition latency of cpu freq and related regulator, &g

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-24 Thread Richard Zhao
On Sat, Dec 24, 2011 at 12:24:11PM +, Mark Brown wrote: > On Sat, Dec 24, 2011 at 04:55:42PM +0800, Richard Zhao wrote: > > On Fri, Dec 23, 2011 at 01:18:51PM +, Mark Brown wrote: > > > > > +- trans-latency : transition_latency, in unit of ns. > > >

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-24 Thread Richard Zhao
On Sat, Dec 24, 2011 at 01:10:40PM +, Jamie Iles wrote: > Hi Richard, > > This is looking really nice. A couple of really minor nits inline, > otherwise: > > Reviewed-by: Jamie Iles Thanks. > > On Thu, Dec 22, 2011 at 03:09:10PM +0800, Richard Zhao wrote

Re: [PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-24 Thread Richard Zhao
On Fri, Dec 23, 2011 at 01:18:51PM +, Mark Brown wrote: > On Thu, Dec 22, 2011 at 03:09:10PM +0800, Richard Zhao wrote: > > The driver get cpu operation point table from device tree cpu0 node, > > and adjusts operating points using clk and regulator APIs. > > Re

[PATCH v4 4/7] cpufreq: add clk-reg cpufreq driver

2011-12-21 Thread Richard Zhao
The driver get cpu operation point table from device tree cpu0 node, and adjusts operating points using clk and regulator APIs. It support single core and multi-core ARM SoCs. But currently it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao --- .../devicetree

[PATCH v4 6/7] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-21 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

[PATCH v4 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate for smp

2011-12-21 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/cpufreq.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index c937e75..364793a 100644

[PATCH v4 1/7] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2011-12-21 Thread Richard Zhao
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao --- arch/arm/kernel/smp.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff

[PATCH v4 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2011-12-21 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- drivers/cpufreq/omap-cpufreq.c | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap

[PATCH v4 0/7] add a generic cpufreq driver

2011-12-21 Thread Richard Zhao
Thanks Arnd, Mark, Jamie, Rob, for your review. Changes in v4: - add depends on HAVE_CLK && OF && REGULATOR - add set_cpu_freq fail check - regulator_put wehn module exit - add pr_fmt and convert all printk to pr_xxx - use voltage range - comment and doc fix - add cpu_volts value pre-check

[PATCH v4 5/7] dts/imx6q: add cpufreq property

2011-12-21 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..2087db7 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts

[PATCH v4 7/7] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-21 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

Re: [PATCH V3 1/7] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2011-12-21 Thread Richard Zhao
Hi Russel, Are the patch #1 #2 #3 ok for you? Thanks Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-21 Thread Richard Zhao
On Wed, Dec 21, 2011 at 01:49:07PM +0100, Kay Sievers wrote: > On Wed, Dec 21, 2011 at 13:12, Mark Brown > wrote: > > On Wed, Dec 21, 2011 at 12:44:57PM +0100, Kay Sievers wrote: > > > >> We will convert all classes to buses over time time, and have a single > >> type of device and a single type o

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-21 Thread Richard Zhao
On Wed, Dec 21, 2011 at 09:20:46AM +0800, Richard Zhao wrote: > Hi Mark, > > On Tue, Dec 20, 2011 at 11:48:45PM +, Mark Brown wrote: > > On Wed, Dec 21, 2011 at 07:27:03AM +0800, Richard Zhao wrote: > > > On Tue, Dec 20, 2011 at 02:59:04PM +, Mark Brown wrote: >

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
On Wed, Dec 21, 2011 at 02:33:36AM +, Mark Brown wrote: > On Wed, Dec 21, 2011 at 10:24:53AM +0800, Richard Zhao wrote: > > On Wed, Dec 21, 2011 at 01:32:21AM +, Mark Brown wrote: > > > > That's not the point - the point is that you may do something like >

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
On Wed, Dec 21, 2011 at 01:32:21AM +, Mark Brown wrote: > On Wed, Dec 21, 2011 at 09:20:46AM +0800, Richard Zhao wrote: > > On Tue, Dec 20, 2011 at 11:48:45PM +, Mark Brown wrote: > > > > Note also that not all hardware specifies things in terms of a fixed set >

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
Hi Mark, On Tue, Dec 20, 2011 at 11:48:45PM +, Mark Brown wrote: > On Wed, Dec 21, 2011 at 07:27:03AM +0800, Richard Zhao wrote: > > On Tue, Dec 20, 2011 at 02:59:04PM +, Mark Brown wrote: > > > > My comments on the previous version of the patch still apply: &g

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
On Tue, Dec 20, 2011 at 02:59:04PM +, Mark Brown wrote: > On Mon, Dec 19, 2011 at 11:21:40AM +0800, Richard Zhao wrote: > > It support single core and multi-core ARM SoCs. But currently it assume > > all cores share the same frequency and voltage. > > My comments on th

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
在 2011-12-20 下午11:13,"Rob Herring" 写道: > > On 12/19/2011 07:59 PM, Richard Zhao wrote: > > On Mon, Dec 19, 2011 at 09:00:44AM -0600, Rob Herring wrote: > >> On 12/19/2011 08:39 AM, Jamie Iles wrote: > >>> On Mon, Dec 19, 2011 at 10:19:29PM +0800, Richard

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-20 Thread Richard Zhao
在 2011-12-20 下午11:22,"Arnd Bergmann" 写道: > > On Tuesday 20 December 2011, Richard Zhao wrote: > > > >>>> +Generic cpufreq driver > > > >>>> + > > > >>>> +Required properties in /cpus/cpu@0: > > > >>>

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-19 Thread Richard Zhao
On Mon, Dec 19, 2011 at 09:00:44AM -0600, Rob Herring wrote: > On 12/19/2011 08:39 AM, Jamie Iles wrote: > > On Mon, Dec 19, 2011 at 10:19:29PM +0800, Richard Zhao wrote: > >> On Mon, Dec 19, 2011 at 10:05:12AM +, Jamie Iles wrote: > >>> Hi Richard, > >&g

Re: [PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-19 Thread Richard Zhao
On Mon, Dec 19, 2011 at 10:05:12AM +, Jamie Iles wrote: > Hi Richard, > > On Mon, Dec 19, 2011 at 11:21:40AM +0800, Richard Zhao wrote: > > It support single core and multi-core ARM SoCs. But currently it assume > > all cores share the same frequency and voltage. &

[PATCH V3 6/7] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-18 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

[PATCH V3 1/7] ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp

2011-12-18 Thread Richard Zhao
If CONFIG_SMP, cpufreq skips loops_per_jiffy update, because different arch has different per-cpu loops_per_jiffy definition. Signed-off-by: Richard Zhao --- arch/arm/kernel/smp.c | 54 + 1 files changed, 54 insertions(+), 0 deletions(-) diff

[PATCH V3 4/7] cpufreq: add generic cpufreq driver

2011-12-18 Thread Richard Zhao
It support single core and multi-core ARM SoCs. But currently it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao --- .../devicetree/bindings/cpufreq/generic-cpufreq|7 + drivers/cpufreq/Kconfig|8 + drivers/cpufreq

[PATCH V3 5/7] dts/imx6q: add cpufreq property

2011-12-18 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..80e47b5 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts

[PATCH V3 2/7] arm/imx: cpufreq: remove loops_per_jiffy recalculate for smp

2011-12-18 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- arch/arm/plat-mxc/cpufreq.c | 10 -- 1 files changed, 0 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-mxc/cpufreq.c b/arch/arm/plat-mxc/cpufreq.c index c937e75..364793a 100644

[PATCH V3 0/7] add a generic cpufreq driver

2011-12-18 Thread Richard Zhao
The driver support single core and multi core ARM SoCs. For multi core, it assume all cores share the same clock and voltage. TODO: - Add each core seperate freq/volt support (MSM). Changes in v3: - move adjusting smp loops_per_jiffy to arm common code, and also adjust global loops_per_jiffy

[PATCH V3 3/7] cpufreq: OMAP: remove loops_per_jiffy recalculate for smp

2011-12-18 Thread Richard Zhao
arm registered cpufreq transition notifier to recalculate it. Signed-off-by: Richard Zhao --- drivers/cpufreq/omap-cpufreq.c | 36 1 files changed, 0 insertions(+), 36 deletions(-) diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap

[PATCH V3 7/7] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-18 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-18 Thread Richard Zhao
Hi Bryan, On Fri, Dec 16, 2011 at 11:59:02AM -0800, Bryan Huntsman wrote: > On 12/16/2011 02:52 AM, Jamie Iles wrote: > > > >> +static DEFINE_PER_CPU(unsigned long, l_p_j_ref); > >> +static unsigned long l_p_j_ref_freq; > >> + > >> +static struct clk *cpu_clk; > > > > This assumes that all CPU's

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-18 Thread Richard Zhao
On Sat, Dec 17, 2011 at 10:29:29AM +0100, Arnd Bergmann wrote: > On Saturday 17 December 2011 16:00:03 Richard Zhao wrote: > > On Fri, Dec 16, 2011 at 08:32:35AM -0600, Rob Herring wrote: > > > On 12/16/2011 04:30 AM, Richard Zhao wrote: > > > > It support single cor

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-17 Thread Richard Zhao
On Fri, Dec 16, 2011 at 11:59:02AM -0800, Bryan Huntsman wrote: > On 12/16/2011 02:52 AM, Jamie Iles wrote: > > > >> +static DEFINE_PER_CPU(unsigned long, l_p_j_ref); > >> +static unsigned long l_p_j_ref_freq; > >> + > >> +static struct clk *cpu_clk; > > > > This assumes that all CPU's share the s

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-17 Thread Richard Zhao
On Fri, Dec 16, 2011 at 10:52:29AM +, Jamie Iles wrote: > Hi Richard, > > A couple of questions inline, but otherwise looks nice! Thanks for your review. > > Jamie > > On Fri, Dec 16, 2011 at 06:30:59PM +0800, Richard Zhao wrote: > > It support single core and

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-17 Thread Richard Zhao
On Fri, Dec 16, 2011 at 08:32:35AM -0600, Rob Herring wrote: > On 12/16/2011 04:30 AM, Richard Zhao wrote: > > It support single core and multi-core ARM SoCs. But it assume > > all cores share the same frequency and voltage. > > > > Signed-off-by: Richard Zhao &

Re: [PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-17 Thread Richard Zhao
On Fri, Dec 16, 2011 at 12:26:03PM +0100, Heiko Stübner wrote: > Am Freitag, 16. Dezember 2011, 11:30:59 schrieb Richard Zhao: > > It support single core and multi-core ARM SoCs. But it assume > > all cores share the same frequency and voltage. > > > >

Re: [PATCH V2 3/4] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-16 Thread Richard Zhao
our board arch/arm/mach-highbank/ Rob maintained? clk API is the most generic way for arm as far as I find out. Thanks Richard > > --Mark Langsdorf > Calxeda, Inc. > > ____ > From: Richard Zhao [richard.z...@linaro.org] > Sent: Friday, Decemb

[PATCH V2 3/4] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-16 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

[PATCH V2 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-16 Thread Richard Zhao
It support single core and multi-core ARM SoCs. But it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao --- drivers/cpufreq/Kconfig.arm |8 ++ drivers/cpufreq/Makefile |1 + drivers/cpufreq/arm-cpufreq.c | 269

[PATCH V2 2/4] dts/imx6q: add cpufreq property

2011-12-16 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..f2e3eaf 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi

[PATCH V2 4/4] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-16 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

[PATCH V2 0/4] add arm soc generic cpufreq driver

2011-12-16 Thread Richard Zhao
The driver support single core and multi core ARM SoCs. For multi core, it assume all cores share the same clock and voltage. Changes in v2: - add volatage change support - change '_' in property name to '-' - use initial value to calculate loops_per_jiffy - fix reading cpu_volts property bug

Re: [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-16 Thread Richard Zhao
On Fri, Dec 16, 2011 at 08:24:23AM +, Russell King - ARM Linux wrote: > On Thu, Dec 15, 2011 at 12:50:07PM -0600, Mark Langsdorf wrote: > > I'd prefer to see clk_get90 replaced with of_clk_get() and > > get_this_cpu_node() from the clk-cpufreq driver by Jamie Iles that > > I resubmitted yesterd

Re: [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-15 Thread Richard Zhao
On Thu, Dec 15, 2011 at 08:29:11PM +, Russell King - ARM Linux wrote: > On Thu, Dec 15, 2011 at 07:16:35PM +0800, Richard Zhao wrote: > > +#ifdef CONFIG_SMP > > + /* loops_per_jiffy is not updated by the cpufreq core for SMP systems. > > +* So u

Re: [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-15 Thread Richard Zhao
On Thu, Dec 15, 2011 at 12:50:07PM -0600, Mark Langsdorf wrote: > Comments below. I tested this on the Calxeda Highbank SoC using > QEMU. I found one definite error and a few things I would change. Thanks for your test. > > On 12/15/2011 05:16 AM, Richard Zhao wrote: > >It suppo

Re: [RFC V1 2/4] dts/imx6q: add cpufreq property

2011-12-15 Thread Richard Zhao
On Thu, Dec 15, 2011 at 07:58:54PM +0800, Shawn Guo wrote: > Hi Richard, > > Whenever we invent some new device tree binding support, we need to > Cc devicetree-disc...@lists.ozlabs.org (Cc-ed). Thanks for your reminder. > > On Thu, Dec 15, 2011 at 07:16:36PM +0800,

Re: [RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-15 Thread Richard Zhao
TODO: - add voltage change. Thanks Richard ___ linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev

[RFC V1 2/4] dts/imx6q: add cpufreq property

2011-12-15 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/boot/dts/imx6q.dtsi |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi index 263e8f3..9e9943b 100644 --- a/arch/arm/boot/dts/imx6q.dtsi +++ b/arch/arm/boot/dts/imx6q.dtsi

[RFC V1 1/4] cpufreq: add arm soc generic cpufreq driver

2011-12-15 Thread Richard Zhao
It support single core and multi-core ARM SoCs. But it assume all cores share the same frequency and voltage. Signed-off-by: Richard Zhao --- drivers/cpufreq/Kconfig.arm |8 ++ drivers/cpufreq/Makefile |1 + drivers/cpufreq/arm-cpufreq.c | 260

[RFC V1 4/4] arm/imx6q: select ARCH_HAS_CPUFREQ

2011-12-15 Thread Richard Zhao
Signed-off-by: Richard Zhao --- arch/arm/mach-imx/Kconfig |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig index c44aa97..39cf00a 100644 --- a/arch/arm/mach-imx/Kconfig +++ b/arch/arm/mach-imx/Kconfig @@ -595,6 +595,7

[RFC V1 3/4] arm/imx6q: register arm_clk as cpu to clkdev

2011-12-15 Thread Richard Zhao
cpufreq needs cpu clock to change frequency. Signed-off-by: Richard Zhao --- arch/arm/mach-imx/clock-imx6q.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-imx/clock-imx6q.c b/arch/arm/mach-imx/clock-imx6q.c index 039a7ab..72acbc2 100644 --- a/arch/arm

Re: [PATCH v4 3/6] clk: introduce the common clock framework

2011-12-13 Thread Richard Zhao
Hi Mike, > + * > + * @recalc_rate Recalculate the rate of this clock, by quering hardware > + * and/or the clock's parent. It is up to the caller to insure > + * that the prepare_mutex is held across this call. Returns the > + * calculated rate. Optional, but re

Re: [Activity] Power Management WG Weekly Status report for week ending 2011-12-09

2011-12-13 Thread Richard Zhao
Hi Amit, On 12 December 2011 15:21, Amit Kucheria wrote: > On Sat, Dec 10, 2011 at 6:59 AM, Richard Zhao wrote: >> I saw a topic 'Multi-core decision co-ordination' at >> https://wiki.linaro.org/WorkingGroups/PowerManagement/Doc/CPUFreq . >> Is it still goin

  1   2   >