Message ID | cover.1403487159.git.horms+renesas@verge.net.au |
---|---|
State | New |
Headers | show |
On Mon, Jun 23, 2014 at 7:55 AM, Simon Horman <horms+renesas@verge.net.au> wrote: > diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c > +int __init shmobile_cpufreq_init(void) > +{ > + struct device_node *np; > + > + np = of_cpu_device_node_get(0); > + if (np == NULL) { > + pr_err("failed to find cpu0 node\n"); > + return 0; > + } > + > + if (of_get_property(np, "operating-points", NULL)) Probably you don't need any of above checks as these are done from cpufreq-cpu0 probe as well.. So, simply create a platform device and let cpufreq-cpu0 driver decide its fate. > + platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); > + > + of_node_put(np); > + > + return 0; > +}
On Mon, Jun 23, 2014 at 09:38:09AM +0530, Viresh Kumar wrote: > On Mon, Jun 23, 2014 at 7:55 AM, Simon Horman > <horms+renesas@verge.net.au> wrote: > > diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c > > > +int __init shmobile_cpufreq_init(void) > > +{ > > + struct device_node *np; > > + > > + np = of_cpu_device_node_get(0); > > + if (np == NULL) { > > + pr_err("failed to find cpu0 node\n"); > > + return 0; > > + } > > + > > + if (of_get_property(np, "operating-points", NULL)) > > Probably you don't need any of above checks as these are done from > cpufreq-cpu0 probe as well.. So, simply create a platform device and > let cpufreq-cpu0 driver decide its fate. Thanks. Inami-san, could you look into this and make an incremental patch as appropriate? > > > + platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0); > > + > > + of_node_put(np); > > + > > + return 0; > > +} > -- > To unsubscribe from this list: send the line "unsubscribe linux-sh" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
(2014/06/23 21:08), Simon Horman wrote: > On Mon, Jun 23, 2014 at 09:38:09AM +0530, Viresh Kumar wrote: >> On Mon, Jun 23, 2014 at 7:55 AM, Simon Horman >> <horms+renesas@verge.net.au> wrote: >>> diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c >>> +int __init shmobile_cpufreq_init(void) >>> +{ >>> + struct device_node *np; >>> + >>> + np = of_cpu_device_node_get(0); >>> + if (np == NULL) { >>> + pr_err("failed to find cpu0 node\n"); >>> + return 0; >>> + } >>> + >>> + if (of_get_property(np, "operating-points", NULL)) >> Probably you don't need any of above checks as these are done from >> cpufreq-cpu0 probe as well.. So, simply create a platform device and >> let cpufreq-cpu0 driver decide its fate. > Thanks. > > Inami-san, could you look into this and make an incremental > patch as appropriate? Thank you for your feedback. I will make an incremental patch based on renesas-devel-v3.16-rc2-20140623.
On Mon, Jun 23, 2014 at 11:25:25AM +0900, Simon Horman wrote: > Hi Olof, Hi Kevin, Hi Arnd, > > Please consider this Renesas ARM based SoC cpufreq update for v3.17. > > > The following changes since commit 7171511eaec5bf23fb06078f59784a3a0626b38f: > > Linux 3.16-rc1 (2014-06-15 17:45:28 -1000) > > are available in the git repository at: > > git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git renesas-cpufreq-for-v3.17 > > for you to fetch changes up to 06e32c91dbce3c24ccbe84e3af2a35199662bca0: > > ARM: shmobile: add cpufreq-cpu0 driver for common SH-Mobile (2014-06-16 19:50:54 +0900) > > ---------------------------------------------------------------- > Renesas ARM Based SoC Cpufreq Updates for v3.17 > > * Add cpufreq-cpu0 driver > Technically inaccurate (for next time): This doesn't add a driver, it adds registration of a device. Merged into next/soc. -Olof