diff options
author | Olof Johansson <olof@lixom.net> | 2013-10-28 17:43:09 -0400 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-10-28 17:43:09 -0400 |
commit | 137f66ee147cb4a06ad1ee04484ae64a9f6ba3f3 (patch) | |
tree | d780e0e5cc8a282aa7786a91708b39c29f39aea8 | |
parent | 7a54698fa6c5ee066f5b7a621a07ca4cd494a667 (diff) | |
parent | 60c5fc86d01154e2a005bf701f495426ebc81f73 (diff) |
Merge tag 'omap-for-v3.13/cpufreq-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/dt
From Tony Lindgren:
Few patches to make cpufreq work for omap3 with device tree.
Note that this branch has a dependency to the patches merged
with omap-for-v3.13/board-removal-signed-take2.
* tag 'omap-for-v3.13/cpufreq-late' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP3+: use cpu0-cpufreq driver in device tree supported boot
ARM: OMAP2+: add missing lateinit hook for calling pm late init
ARM: OMAP3+: do not register non-dt OPP tables for device tree boot
Signed-off-by: Olof Johansson <olof@lixom.net>
-rw-r--r-- | arch/arm/mach-omap2/board-generic.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/common.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/io.c | 20 | ||||
-rw-r--r-- | arch/arm/mach-omap2/opp.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-omap2/pm.c | 12 |
5 files changed, 41 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-generic.c b/arch/arm/mach-omap2/board-generic.c index 3896b12b0006..19f1652e94cf 100644 --- a/arch/arm/mach-omap2/board-generic.c +++ b/arch/arm/mach-omap2/board-generic.c | |||
@@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)") | |||
146 | .init_irq = omap_intc_of_init, | 146 | .init_irq = omap_intc_of_init, |
147 | .handle_irq = omap3_intc_handle_irq, | 147 | .handle_irq = omap3_intc_handle_irq, |
148 | .init_machine = omap_generic_init, | 148 | .init_machine = omap_generic_init, |
149 | .init_late = am33xx_init_late, | ||
149 | .init_time = omap3_gptimer_timer_init, | 150 | .init_time = omap3_gptimer_timer_init, |
150 | .dt_compat = am33xx_boards_compat, | 151 | .dt_compat = am33xx_boards_compat, |
151 | .restart = am33xx_restart, | 152 | .restart = am33xx_restart, |
@@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") | |||
185 | .init_early = omap5_init_early, | 186 | .init_early = omap5_init_early, |
186 | .init_irq = omap_gic_of_init, | 187 | .init_irq = omap_gic_of_init, |
187 | .init_machine = omap_generic_init, | 188 | .init_machine = omap_generic_init, |
189 | .init_late = omap5_init_late, | ||
188 | .init_time = omap5_realtime_timer_init, | 190 | .init_time = omap5_realtime_timer_init, |
189 | .dt_compat = omap5_boards_compat, | 191 | .dt_compat = omap5_boards_compat, |
190 | .restart = omap44xx_restart, | 192 | .restart = omap44xx_restart, |
@@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = { | |||
200 | DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") | 202 | DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") |
201 | .map_io = am33xx_map_io, | 203 | .map_io = am33xx_map_io, |
202 | .init_early = am43xx_init_early, | 204 | .init_early = am43xx_init_early, |
205 | .init_late = am43xx_init_late, | ||
203 | .init_irq = omap_gic_of_init, | 206 | .init_irq = omap_gic_of_init, |
204 | .init_machine = omap_generic_init, | 207 | .init_machine = omap_generic_init, |
205 | .init_time = omap3_sync32k_timer_init, | 208 | .init_time = omap3_sync32k_timer_init, |
@@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)") | |||
218 | .smp = smp_ops(omap4_smp_ops), | 221 | .smp = smp_ops(omap4_smp_ops), |
219 | .map_io = omap5_map_io, | 222 | .map_io = omap5_map_io, |
220 | .init_early = dra7xx_init_early, | 223 | .init_early = dra7xx_init_early, |
224 | .init_late = dra7xx_init_late, | ||
221 | .init_irq = omap_gic_of_init, | 225 | .init_irq = omap_gic_of_init, |
222 | .init_machine = omap_generic_init, | 226 | .init_machine = omap_generic_init, |
223 | .init_time = omap5_realtime_timer_init, | 227 | .init_time = omap5_realtime_timer_init, |
diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index c6aebf0b42d8..f7644febee81 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h | |||
@@ -98,6 +98,7 @@ void am35xx_init_early(void); | |||
98 | void ti81xx_init_early(void); | 98 | void ti81xx_init_early(void); |
99 | void am33xx_init_early(void); | 99 | void am33xx_init_early(void); |
100 | void am43xx_init_early(void); | 100 | void am43xx_init_early(void); |
101 | void am43xx_init_late(void); | ||
101 | void omap4430_init_early(void); | 102 | void omap4430_init_early(void); |
102 | void omap5_init_early(void); | 103 | void omap5_init_early(void); |
103 | void omap3_init_late(void); /* Do not use this one */ | 104 | void omap3_init_late(void); /* Do not use this one */ |
@@ -109,8 +110,11 @@ void omap35xx_init_late(void); | |||
109 | void omap3630_init_late(void); | 110 | void omap3630_init_late(void); |
110 | void am35xx_init_late(void); | 111 | void am35xx_init_late(void); |
111 | void ti81xx_init_late(void); | 112 | void ti81xx_init_late(void); |
113 | void am33xx_init_late(void); | ||
114 | void omap5_init_late(void); | ||
112 | int omap2_common_pm_late_init(void); | 115 | int omap2_common_pm_late_init(void); |
113 | void dra7xx_init_early(void); | 116 | void dra7xx_init_early(void); |
117 | void dra7xx_init_late(void); | ||
114 | 118 | ||
115 | #ifdef CONFIG_SOC_BUS | 119 | #ifdef CONFIG_SOC_BUS |
116 | void omap_soc_device_init(void); | 120 | void omap_soc_device_init(void); |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index ff2113ce4014..a2cbb44582e4 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -583,6 +583,11 @@ void __init am33xx_init_early(void) | |||
583 | omap_hwmod_init_postsetup(); | 583 | omap_hwmod_init_postsetup(); |
584 | omap_clk_init = am33xx_clk_init; | 584 | omap_clk_init = am33xx_clk_init; |
585 | } | 585 | } |
586 | |||
587 | void __init am33xx_init_late(void) | ||
588 | { | ||
589 | omap_common_late_init(); | ||
590 | } | ||
586 | #endif | 591 | #endif |
587 | 592 | ||
588 | #ifdef CONFIG_SOC_AM43XX | 593 | #ifdef CONFIG_SOC_AM43XX |
@@ -596,6 +601,11 @@ void __init am43xx_init_early(void) | |||
596 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL); | 601 | omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL); |
597 | omap3xxx_check_revision(); | 602 | omap3xxx_check_revision(); |
598 | } | 603 | } |
604 | |||
605 | void __init am43xx_init_late(void) | ||
606 | { | ||
607 | omap_common_late_init(); | ||
608 | } | ||
599 | #endif | 609 | #endif |
600 | 610 | ||
601 | #ifdef CONFIG_ARCH_OMAP4 | 611 | #ifdef CONFIG_ARCH_OMAP4 |
@@ -651,6 +661,11 @@ void __init omap5_init_early(void) | |||
651 | omap54xx_hwmod_init(); | 661 | omap54xx_hwmod_init(); |
652 | omap_hwmod_init_postsetup(); | 662 | omap_hwmod_init_postsetup(); |
653 | } | 663 | } |
664 | |||
665 | void __init omap5_init_late(void) | ||
666 | { | ||
667 | omap_common_late_init(); | ||
668 | } | ||
654 | #endif | 669 | #endif |
655 | 670 | ||
656 | #ifdef CONFIG_SOC_DRA7XX | 671 | #ifdef CONFIG_SOC_DRA7XX |
@@ -671,6 +686,11 @@ void __init dra7xx_init_early(void) | |||
671 | dra7xx_hwmod_init(); | 686 | dra7xx_hwmod_init(); |
672 | omap_hwmod_init_postsetup(); | 687 | omap_hwmod_init_postsetup(); |
673 | } | 688 | } |
689 | |||
690 | void __init dra7xx_init_late(void) | ||
691 | { | ||
692 | omap_common_late_init(); | ||
693 | } | ||
674 | #endif | 694 | #endif |
675 | 695 | ||
676 | 696 | ||
diff --git a/arch/arm/mach-omap2/opp.c b/arch/arm/mach-omap2/opp.c index bd41d59a7cab..82fd8c72f750 100644 --- a/arch/arm/mach-omap2/opp.c +++ b/arch/arm/mach-omap2/opp.c | |||
@@ -17,6 +17,7 @@ | |||
17 | * GNU General Public License for more details. | 17 | * GNU General Public License for more details. |
18 | */ | 18 | */ |
19 | #include <linux/module.h> | 19 | #include <linux/module.h> |
20 | #include <linux/of.h> | ||
20 | #include <linux/opp.h> | 21 | #include <linux/opp.h> |
21 | #include <linux/cpu.h> | 22 | #include <linux/cpu.h> |
22 | 23 | ||
@@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, | |||
40 | { | 41 | { |
41 | int i, r; | 42 | int i, r; |
42 | 43 | ||
44 | if (of_have_populated_dt()) | ||
45 | return -EINVAL; | ||
46 | |||
43 | if (!opp_def || !opp_def_size) { | 47 | if (!opp_def || !opp_def_size) { |
44 | pr_err("%s: invalid params!\n", __func__); | 48 | pr_err("%s: invalid params!\n", __func__); |
45 | return -EINVAL; | 49 | return -EINVAL; |
diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c index e742118fcfd2..360b2daf54dd 100644 --- a/arch/arm/mach-omap2/pm.c +++ b/arch/arm/mach-omap2/pm.c | |||
@@ -266,7 +266,12 @@ static void __init omap4_init_voltages(void) | |||
266 | 266 | ||
267 | static inline void omap_init_cpufreq(void) | 267 | static inline void omap_init_cpufreq(void) |
268 | { | 268 | { |
269 | struct platform_device_info devinfo = { .name = "omap-cpufreq", }; | 269 | struct platform_device_info devinfo = { }; |
270 | |||
271 | if (!of_have_populated_dt()) | ||
272 | devinfo.name = "omap-cpufreq"; | ||
273 | else | ||
274 | devinfo.name = "cpufreq-cpu0"; | ||
270 | platform_device_register_full(&devinfo); | 275 | platform_device_register_full(&devinfo); |
271 | } | 276 | } |
272 | 277 | ||
@@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(void) | |||
300 | /* Smartreflex device init */ | 305 | /* Smartreflex device init */ |
301 | omap_devinit_smartreflex(); | 306 | omap_devinit_smartreflex(); |
302 | 307 | ||
303 | /* cpufreq dummy device instantiation */ | ||
304 | omap_init_cpufreq(); | ||
305 | } | 308 | } |
306 | 309 | ||
310 | /* cpufreq dummy device instantiation */ | ||
311 | omap_init_cpufreq(); | ||
312 | |||
307 | #ifdef CONFIG_SUSPEND | 313 | #ifdef CONFIG_SUSPEND |
308 | suspend_set_ops(&omap_pm_ops); | 314 | suspend_set_ops(&omap_pm_ops); |
309 | #endif | 315 | #endif |