[omap]: refresh/rename patches
[openwrt.git] / target / linux / omap / patches-3.12 / 804-ARM_OMAP3plus_use_cpu0-cpufreq_driver_in_device_tree_supported_boot.patch
1 From 60c5fc86d01154e2a005bf701f495426ebc81f73 Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Wed, 16 Oct 2013 15:39:03 +0000
4 Subject: ARM: OMAP3+: use cpu0-cpufreq driver in device tree supported boot
5
6 With OMAP3+ and AM33xx supported SoC having defined CPU device tree
7 entries with operating-points and clock nodes defined, we can now use
8 the SoC generic cpufreq-cpu0 driver by registering appropriate device.
9
10 Cc: Benoit Cousson <bcousson@baylibre.com>
11 Cc: Kevin Hilman <khilman@deeprootsystems.com>
12 Cc: Paul Walmsley <paul@pwsan.com>
13 Cc: Tony Lindgren <tony@atomide.com>
14 Signed-off-by: Nishanth Menon <nm@ti.com>
15 Signed-off-by: Tony Lindgren <tony@atomide.com>
16 ---
17 --- a/arch/arm/mach-omap2/pm.c
18 +++ b/arch/arm/mach-omap2/pm.c
19 @@ -266,7 +266,12 @@ static void __init omap4_init_voltages(v
20  
21  static inline void omap_init_cpufreq(void)
22  {
23 -       struct platform_device_info devinfo = { .name = "omap-cpufreq", };
24 +       struct platform_device_info devinfo = { };
25 +
26 +       if (!of_have_populated_dt())
27 +               devinfo.name = "omap-cpufreq";
28 +       else
29 +               devinfo.name = "cpufreq-cpu0";
30         platform_device_register_full(&devinfo);
31  }
32  
33 @@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(voi
34                 /* Smartreflex device init */
35                 omap_devinit_smartreflex();
36  
37 -               /* cpufreq dummy device instantiation */
38 -               omap_init_cpufreq();
39         }
40  
41 +       /* cpufreq dummy device instantiation */
42 +       omap_init_cpufreq();
43 +
44  #ifdef CONFIG_SUSPEND
45         suspend_set_ops(&omap_pm_ops);
46  #endif