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
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.
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>
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)
23 static inline void omap_init_cpufreq(void)
25 - struct platform_device_info devinfo = { .name = "omap-cpufreq", };
26 + struct platform_device_info devinfo = { };
28 + if (!of_have_populated_dt())
29 + devinfo.name = "omap-cpufreq";
31 + devinfo.name = "cpufreq-cpu0";
32 platform_device_register_full(&devinfo);
35 @@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(void)
36 /* Smartreflex device init */
37 omap_devinit_smartreflex();
39 - /* cpufreq dummy device instantiation */
40 - omap_init_cpufreq();
43 + /* cpufreq dummy device instantiation */
44 + omap_init_cpufreq();
47 suspend_set_ops(&omap_pm_ops);