Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-24 Thread Thierry Reding
On Thu, Jul 24, 2014 at 05:43:40AM +0530, Viresh Kumar wrote: > On 24 July 2014 00:47, Tuomas Tynkkynen wrote: > > It's this: > > > > +static int tegra124_cpufreq_probe(struct platform_device *pdev) > > +{ > > [...] > > + > > + dfll_clk = of_clk_get_by_name(cpu_dev->of_node, "dfll"); > > +

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Viresh Kumar
On 24 July 2014 00:47, Tuomas Tynkkynen wrote: > It's this: > > +static int tegra124_cpufreq_probe(struct platform_device *pdev) > +{ > [...] > + > + dfll_clk = of_clk_get_by_name(cpu_dev->of_node, "dfll"); > + if (IS_ERR(dfll_clk)) { > + ret = PTR_ERR(dfll_clk); > +

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 19:50, Viresh Kumar wrote: > On 23 July 2014 17:27, Tuomas Tynkkynen wrote: >> The platform device is required for the deferred probe that can happen if the >> DFLL driver hasn't initialized yet, and module_init() callbacks don't seem to >> respect -EPROBE_DEFER. > > Oh, which call

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Viresh Kumar
On 23 July 2014 17:27, Tuomas Tynkkynen wrote: > The platform device is required for the deferred probe that can happen if the > DFLL driver hasn't initialized yet, and module_init() callbacks don't seem to > respect -EPROBE_DEFER. Oh, which call in this file will return EPROBE_DEFER? I couldn't

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Thierry Reding
On Wed, Jul 23, 2014 at 03:35:46PM +0300, Tuomas Tynkkynen wrote: > On 23/07/14 10:09, Thierry Reding wrote: > > On Mon, Jul 21, 2014 at 06:39:00PM +0300, Tuomas Tynkkynen wrote: [...] > >> diff --git a/drivers/cpufreq/tegra124-cpufreq.c > >> b/drivers/cpufreq/tegra124-cpufreq.c [...] > >> + cpu_

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Thierry Reding
On Wed, Jul 23, 2014 at 01:55:57PM +0530, Viresh Kumar wrote: > On 23 July 2014 12:54, Thierry Reding wrote: > > ARM_TEGRA_CPUFREQ is still optional, so the select only applies when the > > Tegra cpufreq driver is enabled. This is mostly just out of convenience, > > though. The Tegra cpufreq drive

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 10:09, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Mon, Jul 21, 2014 at 06:39:00PM +0300, Tuomas Tynkkynen wrote: > [...] >> diff --git a/drivers/cpufreq/tegra124-cpufreq.c >> b/drivers/cpufreq/tegra124-cpufreq.c > [...] >> +static int tegra124_cpu_switch_to_dfll(v

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Tuomas Tynkkynen
On 23/07/14 07:44, Viresh Kumar wrote: > On 21 July 2014 21:09, Tuomas Tynkkynen wrote: > >> diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm >> index 7364a53..df3c73e 100644 >> --- a/drivers/cpufreq/Kconfig.arm >> +++ b/drivers/cpufreq/Kconfig.arm >> @@ -244,6 +244,7 @@ c

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Viresh Kumar
On 23 July 2014 12:54, Thierry Reding wrote: > ARM_TEGRA_CPUFREQ is still optional, so the select only applies when the > Tegra cpufreq driver is enabled. This is mostly just out of convenience, > though. The Tegra cpufreq driver uses the generic CPU0 cpufreq driver so > a select will automaticall

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Thierry Reding
On Wed, Jul 23, 2014 at 12:28:21PM +0530, Viresh Kumar wrote: > On 23 July 2014 12:24, Thierry Reding wrote: > > On Wed, Jul 23, 2014 at 10:14:44AM +0530, Viresh Kumar wrote: > >> On 21 July 2014 21:09, Tuomas Tynkkynen wrote: > >> > >> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread pramod gurav
On Mon, Jul 21, 2014 at 9:09 PM, Tuomas Tynkkynen wrote: > Add a new cpufreq driver for Tegra124. Instead of using the PLLX as > + > +static int tegra124_cpu_switch_to_dfll(void) > +{ > + struct clk *original_cpu_clk_parent; > + unsigned long rate; > + struct dev_pm_opp *opp;

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-23 Thread Thierry Reding
On Mon, Jul 21, 2014 at 06:39:00PM +0300, Tuomas Tynkkynen wrote: [...] > diff --git a/drivers/cpufreq/tegra124-cpufreq.c > b/drivers/cpufreq/tegra124-cpufreq.c [...] > +static int tegra124_cpu_switch_to_dfll(void) > +{ > + struct clk *original_cpu_clk_parent; Maybe just "parent"? > + un

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-22 Thread Viresh Kumar
On 23 July 2014 12:24, Thierry Reding wrote: > On Wed, Jul 23, 2014 at 10:14:44AM +0530, Viresh Kumar wrote: >> On 21 July 2014 21:09, Tuomas Tynkkynen wrote: >> >> > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm >> > index 7364a53..df3c73e 100644 >> > --- a/drivers/cpufr

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-22 Thread Thierry Reding
On Wed, Jul 23, 2014 at 10:14:44AM +0530, Viresh Kumar wrote: > On 21 July 2014 21:09, Tuomas Tynkkynen wrote: > > > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > > index 7364a53..df3c73e 100644 > > --- a/drivers/cpufreq/Kconfig.arm > > +++ b/drivers/cpufreq/Kconfig.arm

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-22 Thread Viresh Kumar
On 21 July 2014 21:09, Tuomas Tynkkynen wrote: > diff --git a/drivers/cpufreq/Kconfig.arm b/drivers/cpufreq/Kconfig.arm > index 7364a53..df3c73e 100644 > --- a/drivers/cpufreq/Kconfig.arm > +++ b/drivers/cpufreq/Kconfig.arm > @@ -244,6 +244,7 @@ config ARM_SPEAR_CPUFREQ > config ARM_TEGRA_CPUFRE

Re: [PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-21 Thread Rafael J. Wysocki
On Monday, July 21, 2014 06:39:00 PM Tuomas Tynkkynen wrote: > Add a new cpufreq driver for Tegra124. Instead of using the PLLX as > the CPU clocksource, switch immediately to the DFLL. It allows the use > of higher clock rates, and will automatically scale the CPU voltage as > well. Besides the CP

[PATCH v2 14/16] cpufreq: Add cpufreq driver for Tegra124

2014-07-21 Thread Tuomas Tynkkynen
Add a new cpufreq driver for Tegra124. Instead of using the PLLX as the CPU clocksource, switch immediately to the DFLL. It allows the use of higher clock rates, and will automatically scale the CPU voltage as well. Besides the CPU clocksource switch, we let the cpufreq-cpu0 driver for all the cpuf