ARM: OMAP2+: add missing lateinit hook for calling pm late init
authorNishanth Menon <nm@ti.com>
Wed, 16 Oct 2013 15:39:02 +0000 (10:39 -0500)
committerTony Lindgren <tony@atomide.com>
Tue, 22 Oct 2013 15:09:50 +0000 (08:09 -0700)
AM335x, AM43xx, OMAP5 and DRA7 have missing late init hook. Introduce
SoC specific hook with a call to OMAP2+ generic lateinit hook. This
allows the generic late initializations such as cpufreq hooks to be
active.

Based on out-of-tree patches that need to be introduced in
mainline, this introduction allows us to provide the foundation for
further SoC specific features as they are developed.

Cc: Benoit Cousson <bcousson@baylibre.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Paul Walmsley <paul@pwsan.com>
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-generic.c
arch/arm/mach-omap2/common.h
arch/arm/mach-omap2/io.c

index 3896b12b0006b7a4ff39cb72d93dff23db66eac1..19f1652e94cfbf5e1f09d2d4cc27e44087cc68d7 100644 (file)
@@ -146,6 +146,7 @@ DT_MACHINE_START(AM33XX_DT, "Generic AM33XX (Flattened Device Tree)")
        .init_irq       = omap_intc_of_init,
        .handle_irq     = omap3_intc_handle_irq,
        .init_machine   = omap_generic_init,
+       .init_late      = am33xx_init_late,
        .init_time      = omap3_gptimer_timer_init,
        .dt_compat      = am33xx_boards_compat,
        .restart        = am33xx_restart,
@@ -185,6 +186,7 @@ DT_MACHINE_START(OMAP5_DT, "Generic OMAP5 (Flattened Device Tree)")
        .init_early     = omap5_init_early,
        .init_irq       = omap_gic_of_init,
        .init_machine   = omap_generic_init,
+       .init_late      = omap5_init_late,
        .init_time      = omap5_realtime_timer_init,
        .dt_compat      = omap5_boards_compat,
        .restart        = omap44xx_restart,
@@ -200,6 +202,7 @@ static const char *am43_boards_compat[] __initdata = {
 DT_MACHINE_START(AM43_DT, "Generic AM43 (Flattened Device Tree)")
        .map_io         = am33xx_map_io,
        .init_early     = am43xx_init_early,
+       .init_late      = am43xx_init_late,
        .init_irq       = omap_gic_of_init,
        .init_machine   = omap_generic_init,
        .init_time      = omap3_sync32k_timer_init,
@@ -218,6 +221,7 @@ DT_MACHINE_START(DRA7XX_DT, "Generic DRA7XX (Flattened Device Tree)")
        .smp            = smp_ops(omap4_smp_ops),
        .map_io         = omap5_map_io,
        .init_early     = dra7xx_init_early,
+       .init_late      = dra7xx_init_late,
        .init_irq       = omap_gic_of_init,
        .init_machine   = omap_generic_init,
        .init_time      = omap5_realtime_timer_init,
index c6aebf0b42d8d02468171fce20301eac3a9df3c6..f7644febee81d7d41ae2cfc01e1fc362b972de02 100644 (file)
@@ -98,6 +98,7 @@ void am35xx_init_early(void);
 void ti81xx_init_early(void);
 void am33xx_init_early(void);
 void am43xx_init_early(void);
+void am43xx_init_late(void);
 void omap4430_init_early(void);
 void omap5_init_early(void);
 void omap3_init_late(void);    /* Do not use this one */
@@ -109,8 +110,11 @@ void omap35xx_init_late(void);
 void omap3630_init_late(void);
 void am35xx_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);
 void dra7xx_init_early(void);
+void dra7xx_init_late(void);
 
 #ifdef CONFIG_SOC_BUS
 void omap_soc_device_init(void);
index ff2113ce40141ab87001c912b3924fe1803cdec3..a2cbb44582e4554d9464bb26db0084f85386273f 100644 (file)
@@ -583,6 +583,11 @@ void __init am33xx_init_early(void)
        omap_hwmod_init_postsetup();
        omap_clk_init = am33xx_clk_init;
 }
+
+void __init am33xx_init_late(void)
+{
+       omap_common_late_init();
+}
 #endif
 
 #ifdef CONFIG_SOC_AM43XX
@@ -596,6 +601,11 @@ void __init am43xx_init_early(void)
        omap2_set_globals_cm(AM33XX_L4_WK_IO_ADDRESS(AM43XX_PRCM_BASE), NULL);
        omap3xxx_check_revision();
 }
+
+void __init am43xx_init_late(void)
+{
+       omap_common_late_init();
+}
 #endif
 
 #ifdef CONFIG_ARCH_OMAP4
@@ -651,6 +661,11 @@ void __init omap5_init_early(void)
        omap54xx_hwmod_init();
        omap_hwmod_init_postsetup();
 }
+
+void __init omap5_init_late(void)
+{
+       omap_common_late_init();
+}
 #endif
 
 #ifdef CONFIG_SOC_DRA7XX
@@ -671,6 +686,11 @@ void __init dra7xx_init_early(void)
        dra7xx_hwmod_init();
        omap_hwmod_init_postsetup();
 }
+
+void __init dra7xx_init_late(void)
+{
+       omap_common_late_init();
+}
 #endif