Commit 137f66ee authored by Olof Johansson's avatar Olof Johansson

Merge tag 'omap-for-v3.13/cpufreq-late' of...

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: default avatarOlof Johansson <olof@lixom.net>
parents 7a54698f 60c5fc86
...@@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)") ...@@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
.init_irq = omap_intc_of_init, .init_irq = omap_intc_of_init,
.handle_irq = omap3_intc_handle_irq, .handle_irq = omap3_intc_handle_irq,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_late = am33xx_init_late,
.init_time = omap3_gptimer_timer_init, .init_time = omap3_gptimer_timer_init,
.dt_compat = am33xx_boards_compat, .dt_compat = am33xx_boards_compat,
.restart = am33xx_restart, .restart = am33xx_restart,
...@@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)") ...@@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
.init_early = omap5_init_early, .init_early = omap5_init_early,
.init_irq = omap_gic_of_init, .init_irq = omap_gic_of_init,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_late = omap5_init_late,
.init_time = omap5_realtime_timer_init, .init_time = omap5_realtime_timer_init,
.dt_compat = omap5_boards_compat, .dt_compat = omap5_boards_compat,
.restart = omap44xx_restart, .restart = omap44xx_restart,
...@@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = { ...@@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = {
DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)") DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
.map_io = am33xx_map_io, .map_io = am33xx_map_io,
.init_early = am43xx_init_early, .init_early = am43xx_init_early,
.init_late = am43xx_init_late,
.init_irq = omap_gic_of_init, .init_irq = omap_gic_of_init,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_time = omap3_sync32k_timer_init, .init_time = omap3_sync32k_timer_init,
...@@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)") ...@@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
.smp = smp_ops(omap4_smp_ops), .smp = smp_ops(omap4_smp_ops),
.map_io = omap5_map_io, .map_io = omap5_map_io,
.init_early = dra7xx_init_early, .init_early = dra7xx_init_early,
.init_late = dra7xx_init_late,
.init_irq = omap_gic_of_init, .init_irq = omap_gic_of_init,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_time = omap5_realtime_timer_init, .init_time = omap5_realtime_timer_init,
......
...@@ -98,6 +98,7 @@ void am35xx_init_early(void); ...@@ -98,6 +98,7 @@ void am35xx_init_early(void);
void ti81xx_init_early(void); void ti81xx_init_early(void);
void am33xx_init_early(void); void am33xx_init_early(void);
void am43xx_init_early(void); void am43xx_init_early(void);
void am43xx_init_late(void);
void omap4430_init_early(void); void omap4430_init_early(void);
void omap5_init_early(void); void omap5_init_early(void);
void omap3_init_late(void); /* Do not use this one */ void omap3_init_late(void); /* Do not use this one */
...@@ -109,8 +110,11 @@ void omap35xx_init_late(void); ...@@ -109,8 +110,11 @@ void omap35xx_init_late(void);
void omap3630_init_late(void); void omap3630_init_late(void);
void am35xx_init_late(void); void am35xx_init_late(void);
void ti81xx_init_late(void); void ti81xx_init_late(void);
void am33xx_init_late(void);
void omap5_init_late(void);
int omap2_common_pm_late_init(void); int omap2_common_pm_late_init(void);
void dra7xx_init_early(void); void dra7xx_init_early(void);
void dra7xx_init_late(void);
#ifdef CONFIG_SOC_BUS #ifdef CONFIG_SOC_BUS
void omap_soc_device_init(void); void omap_soc_device_init(void);
......
...@@ -583,6 +583,11 @@ void __init am33xx_init_early(void) ...@@ -583,6 +583,11 @@ void __init am33xx_init_early(void)
omap_hwmod_init_postsetup(); omap_hwmod_init_postsetup();
omap_clk_init = am33xx_clk_init; omap_clk_init = am33xx_clk_init;
} }
void __init am33xx_init_late(void)
{
omap_common_late_init();
}
#endif #endif
#ifdef CONFIG_SOC_AM43XX #ifdef CONFIG_SOC_AM43XX
...@@ -596,6 +601,11 @@ void __init am43xx_init_early(void) ...@@ -596,6 +601,11 @@ void __init am43xx_init_early(void)
omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL); omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
omap3xxx_check_revision(); omap3xxx_check_revision();
} }
void __init am43xx_init_late(void)
{
omap_common_late_init();
}
#endif #endif
#ifdef CONFIG_ARCH_OMAP4 #ifdef CONFIG_ARCH_OMAP4
...@@ -651,6 +661,11 @@ void __init omap5_init_early(void) ...@@ -651,6 +661,11 @@ void __init omap5_init_early(void)
omap54xx_hwmod_init(); omap54xx_hwmod_init();
omap_hwmod_init_postsetup(); omap_hwmod_init_postsetup();
} }
void __init omap5_init_late(void)
{
omap_common_late_init();
}
#endif #endif
#ifdef CONFIG_SOC_DRA7XX #ifdef CONFIG_SOC_DRA7XX
...@@ -671,6 +686,11 @@ void __init dra7xx_init_early(void) ...@@ -671,6 +686,11 @@ void __init dra7xx_init_early(void)
dra7xx_hwmod_init(); dra7xx_hwmod_init();
omap_hwmod_init_postsetup(); omap_hwmod_init_postsetup();
} }
void __init dra7xx_init_late(void)
{
omap_common_late_init();
}
#endif #endif
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
* GNU General Public License for more details. * GNU General Public License for more details.
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/of.h>
#include <linux/opp.h> #include <linux/opp.h>
#include <linux/cpu.h> #include <linux/cpu.h>
...@@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def, ...@@ -40,6 +41,9 @@ int __init omap_init_opp_table(struct omap_opp_def *opp_def,
{ {
int i, r; int i, r;
if (of_have_populated_dt())
return -EINVAL;
if (!opp_def || !opp_def_size) { if (!opp_def || !opp_def_size) {
pr_err("%s: invalid params!\n", __func__); pr_err("%s: invalid params!\n", __func__);
return -EINVAL; return -EINVAL;
......
...@@ -266,7 +266,12 @@ static void __init omap4_init_voltages(void) ...@@ -266,7 +266,12 @@ static void __init omap4_init_voltages(void)
static inline void omap_init_cpufreq(void) static inline void omap_init_cpufreq(void)
{ {
struct platform_device_info devinfo = { .name = "omap-cpufreq", }; struct platform_device_info devinfo = { };
if (!of_have_populated_dt())
devinfo.name = "omap-cpufreq";
else
devinfo.name = "cpufreq-cpu0";
platform_device_register_full(&devinfo); platform_device_register_full(&devinfo);
} }
...@@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(void) ...@@ -300,10 +305,11 @@ int __init omap2_common_pm_late_init(void)
/* Smartreflex device init */ /* Smartreflex device init */
omap_devinit_smartreflex(); omap_devinit_smartreflex();
/* cpufreq dummy device instantiation */
omap_init_cpufreq();
} }
/* cpufreq dummy device instantiation */
omap_init_cpufreq();
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
suspend_set_ops(&omap_pm_ops); suspend_set_ops(&omap_pm_ops);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment