fix gpio interrupt-cells property on AM335x
[openwrt/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 diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
18 index e742118..360b2da 100644
19 --- a/arch/arm/mach-omap2/pm.c
20 +++ b/arch/arm/mach-omap2/pm.c
21 @@ -266,7 +266,12 @@ static void __init omap4_init_voltages(void)
22
23 static inline void omap_init_cpufreq(void)
24 {
25 - struct platform_device_info devinfo = { .name = "omap-cpufreq", };
26 + struct platform_device_info devinfo = { };
27 +
28 + if (!of_have_populated_dt())
29 + devinfo.name = "omap-cpufreq";
30 + else
31 + devinfo.name = "cpufreq-cpu0";
32 platform_device_register_full(&devinfo);
33 }
34
35 @@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(void)
36 /* Smartreflex device init */
37 omap_devinit_smartreflex();
38
39 - /* cpufreq dummy device instantiation */
40 - omap_init_cpufreq();
41 }
42
43 + /* cpufreq dummy device instantiation */
44 + omap_init_cpufreq();
45 +
46 #ifdef CONFIG_SUSPEND
47 suspend_set_ops(&omap_pm_ops);
48 #endif
49 --
50 cgit v0.9.2