ARM: omap1: use machine specific hook for late init
authorShawn Guo <shawn.guo@linaro.org>
Thu, 26 Apr 2012 05:49:29 +0000 (13:49 +0800)
committerShawn Guo <shawn.guo@linaro.org>
Tue, 8 May 2012 12:36:18 +0000 (20:36 +0800)
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Tony Lindgren <tony@atomide.com>
18 files changed:
arch/arm/mach-omap1/board-ams-delta.c
arch/arm/mach-omap1/board-fsample.c
arch/arm/mach-omap1/board-generic.c
arch/arm/mach-omap1/board-h2.c
arch/arm/mach-omap1/board-h3.c
arch/arm/mach-omap1/board-htcherald.c
arch/arm/mach-omap1/board-innovator.c
arch/arm/mach-omap1/board-nokia770.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/board-palmte.c
arch/arm/mach-omap1/board-palmtt.c
arch/arm/mach-omap1/board-palmz71.c
arch/arm/mach-omap1/board-perseus2.c
arch/arm/mach-omap1/board-sx1.c
arch/arm/mach-omap1/board-voiceblue.c
arch/arm/mach-omap1/common.h
arch/arm/mach-omap1/io.c
arch/arm/mach-omap1/serial.c

index c1b681ef4cba80870ccec99715b14eb0ddfad07a..f2f8a58470182c5d1d783b1a3496833f1b1dfbc7 100644 (file)
@@ -595,7 +595,12 @@ gpio_free:
        gpio_free(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
        return err;
 }
-late_initcall(late_init);
+
+static void __init ams_delta_init_late(void)
+{
+       omap1_init_late();
+       late_init();
+}
 
 static void __init ams_delta_map_io(void)
 {
@@ -611,6 +616,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = ams_delta_init,
+       .init_late      = ams_delta_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 80bd43c7f4ec9563b3599f84ca9f51d614170cb8..a77ee57f840d4510b5f526571ed4fef162b37431 100644 (file)
@@ -383,6 +383,7 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_fsample_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 9a5fe581bc1c8c0e22264edbe5b8dd17b9215780..e75e2d55a2d72ba133c5e923389c03512058461e 100644 (file)
@@ -88,6 +88,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_generic_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 553a2e535764b54b83635ba7161e5f67fd1c0c1d..04cf9945575822e623f2791b9d9544f585511ed4 100644 (file)
@@ -446,6 +446,7 @@ MACHINE_START(OMAP_H2, "TI-H2")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = h2_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 4c19f4c06851ff2c15c41a93807f33d73364fbe3..a11ef0a7c025a4ab2a7b6a96324e03cafe4d3b96 100644 (file)
@@ -439,6 +439,7 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = h3_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 60c06ee23855d018198698dbd74110611447d8e6..118a9d4a4c54a56b2bad8b261c60335b3f3a3f82 100644 (file)
@@ -605,6 +605,7 @@ MACHINE_START(HERALD, "HTC Herald")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = htcherald_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 67d7fd57a692b7d7c209b01859ad0a97cc8c86f0..7970223a559d552d270953905a2107e3dfb2446f 100644 (file)
@@ -457,6 +457,7 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = innovator_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index d21dcc2fbc5af3a3b53477e8e735aa5bcb428447..7212ae97f44acfc1ff508fbca348a3ff26702a8a 100644 (file)
@@ -255,6 +255,7 @@ MACHINE_START(NOKIA770, "Nokia 770")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_nokia770_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index a5f85dda3f6924ce84dce90270a704edfafd6962..da8d872d3d1cddf00bdab9c3bdec4684ec585989 100644 (file)
@@ -574,6 +574,7 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = osk_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index a60e6c22f8169ed9027e26b2425b54875d23deba..949b62a736931b0a74158727ca2ca2ecf488c6e8 100644 (file)
@@ -267,6 +267,7 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmte_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 8d854878547be0fcdcc77e9e539b3d819d33ae97..7f1e1cf2bf46a47e525338ff47398b2226ea997f 100644 (file)
@@ -313,6 +313,7 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmtt_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index a2c5abcd7c84e56d53c441059cf526294883c294..0711685f89a598a88d0afa9cbb90dcfe1516e2a5 100644 (file)
@@ -330,6 +330,7 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_palmz71_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 76d4ee05a814783c9b12ecfb47bcfe9e5d43dc05..512989bb15c001240977dc6240f69c9fd275a4ce 100644 (file)
@@ -345,6 +345,7 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_perseus2_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index f34cb74a9f41d12cbe3983dcd121fa11f4ccb5cd..3b7b82b136840ac05fcedaa1e9ba3da1617df96b 100644 (file)
@@ -407,6 +407,7 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = omap_sx1_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = omap1_restart,
 MACHINE_END
index 37232d04233ff779bb44e631d4675559ef34de19..afd67f0ec495160d4c5f996f8f81b6832b03e1c2 100644 (file)
@@ -294,6 +294,7 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
        .reserve        = omap_reserve,
        .init_irq       = omap1_init_irq,
        .init_machine   = voiceblue_init,
+       .init_late      = omap1_init_late,
        .timer          = &omap1_timer,
        .restart        = voiceblue_restart,
 MACHINE_END
index af658ad338ec8d253f3da5b649a3a6a27ae7df59..0b77e6d68f5f51cdf03a3e2a9efd7344ca5cbdd3 100644 (file)
@@ -52,8 +52,18 @@ static inline void omap16xx_map_io(void)
 }
 #endif
 
+#ifdef CONFIG_OMAP_SERIAL_WAKE
+int omap_serial_wakeup_init(void);
+#else
+static inline int omap_serial_wakeup_init(void)
+{
+       return 0;
+}
+#endif
+
 void omap1_init_early(void);
 void omap1_init_irq(void);
+void omap1_init_late(void);
 void omap1_restart(char, const char *);
 
 extern struct sys_timer omap1_timer;
index d969a7203d14ad1e0387e034c2b025d517ba46df..cf811f2bc7fc288491a2b468c537c24961387a7f 100644 (file)
@@ -138,6 +138,11 @@ void __init omap1_init_early(void)
        omap_init_consistent_dma_size();
 }
 
+void __init omap1_init_late(void)
+{
+       omap_serial_wakeup_init();
+}
+
 /*
  * NOTE: Please use ioremap + __raw_read/write where possible instead of these
  */
index 93ae8f29727e61a002bcf705a6d2492f4772023a..6809c9e56c9317dfdbaf8eff92e79d651d164237 100644 (file)
@@ -237,7 +237,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
        enable_irq_wake(gpio_to_irq(gpio_nr));
 }
 
-static int __init omap_serial_wakeup_init(void)
+int __init omap_serial_wakeup_init(void)
 {
        if (!cpu_is_omap16xx())
                return 0;
@@ -251,7 +251,6 @@ static int __init omap_serial_wakeup_init(void)
 
        return 0;
 }
-late_initcall(omap_serial_wakeup_init);
 
 #endif /* CONFIG_OMAP_SERIAL_WAKE */