Commit 82c3bd03 authored by Shawn Guo's avatar Shawn Guo

ARM: omap1: use machine specific hook for late init

Signed-off-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent c633c531
...@@ -595,7 +595,12 @@ static int __init late_init(void) ...@@ -595,7 +595,12 @@ static int __init late_init(void)
gpio_free(AMS_DELTA_GPIO_PIN_MODEM_IRQ); gpio_free(AMS_DELTA_GPIO_PIN_MODEM_IRQ);
return err; 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) static void __init ams_delta_map_io(void)
{ {
...@@ -611,6 +616,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)") ...@@ -611,6 +616,7 @@ MACHINE_START(AMS_DELTA, "Amstrad E3 (Delta)")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = ams_delta_init, .init_machine = ams_delta_init,
.init_late = ams_delta_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -383,6 +383,7 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample") ...@@ -383,6 +383,7 @@ MACHINE_START(OMAP_FSAMPLE, "OMAP730 F-Sample")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_fsample_init, .init_machine = omap_fsample_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -88,6 +88,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710") ...@@ -88,6 +88,7 @@ MACHINE_START(OMAP_GENERIC, "Generic OMAP1510/1610/1710")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_generic_init, .init_machine = omap_generic_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -446,6 +446,7 @@ MACHINE_START(OMAP_H2, "TI-H2") ...@@ -446,6 +446,7 @@ MACHINE_START(OMAP_H2, "TI-H2")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = h2_init, .init_machine = h2_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -439,6 +439,7 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board") ...@@ -439,6 +439,7 @@ MACHINE_START(OMAP_H3, "TI OMAP1710 H3 board")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = h3_init, .init_machine = h3_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -605,6 +605,7 @@ MACHINE_START(HERALD, "HTC Herald") ...@@ -605,6 +605,7 @@ MACHINE_START(HERALD, "HTC Herald")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = htcherald_init, .init_machine = htcherald_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -457,6 +457,7 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator") ...@@ -457,6 +457,7 @@ MACHINE_START(OMAP_INNOVATOR, "TI-Innovator")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = innovator_init, .init_machine = innovator_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -255,6 +255,7 @@ MACHINE_START(NOKIA770, "Nokia 770") ...@@ -255,6 +255,7 @@ MACHINE_START(NOKIA770, "Nokia 770")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_nokia770_init, .init_machine = omap_nokia770_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -574,6 +574,7 @@ MACHINE_START(OMAP_OSK, "TI-OSK") ...@@ -574,6 +574,7 @@ MACHINE_START(OMAP_OSK, "TI-OSK")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = osk_init, .init_machine = osk_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -267,6 +267,7 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E") ...@@ -267,6 +267,7 @@ MACHINE_START(OMAP_PALMTE, "OMAP310 based Palm Tungsten E")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_palmte_init, .init_machine = omap_palmte_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -313,6 +313,7 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T") ...@@ -313,6 +313,7 @@ MACHINE_START(OMAP_PALMTT, "OMAP1510 based Palm Tungsten|T")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_palmtt_init, .init_machine = omap_palmtt_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -330,6 +330,7 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71") ...@@ -330,6 +330,7 @@ MACHINE_START(OMAP_PALMZ71, "OMAP310 based Palm Zire71")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_palmz71_init, .init_machine = omap_palmz71_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -345,6 +345,7 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2") ...@@ -345,6 +345,7 @@ MACHINE_START(OMAP_PERSEUS2, "OMAP730 Perseus2")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_perseus2_init, .init_machine = omap_perseus2_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -407,6 +407,7 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1") ...@@ -407,6 +407,7 @@ MACHINE_START(SX1, "OMAP310 based Siemens SX1")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = omap_sx1_init, .init_machine = omap_sx1_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = omap1_restart, .restart = omap1_restart,
MACHINE_END MACHINE_END
...@@ -294,6 +294,7 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910") ...@@ -294,6 +294,7 @@ MACHINE_START(VOICEBLUE, "VoiceBlue OMAP5910")
.reserve = omap_reserve, .reserve = omap_reserve,
.init_irq = omap1_init_irq, .init_irq = omap1_init_irq,
.init_machine = voiceblue_init, .init_machine = voiceblue_init,
.init_late = omap1_init_late,
.timer = &omap1_timer, .timer = &omap1_timer,
.restart = voiceblue_restart, .restart = voiceblue_restart,
MACHINE_END MACHINE_END
...@@ -52,8 +52,18 @@ static inline void omap16xx_map_io(void) ...@@ -52,8 +52,18 @@ static inline void omap16xx_map_io(void)
} }
#endif #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_early(void);
void omap1_init_irq(void); void omap1_init_irq(void);
void omap1_init_late(void);
void omap1_restart(char, const char *); void omap1_restart(char, const char *);
extern struct sys_timer omap1_timer; extern struct sys_timer omap1_timer;
......
...@@ -138,6 +138,11 @@ void __init omap1_init_early(void) ...@@ -138,6 +138,11 @@ void __init omap1_init_early(void)
omap_init_consistent_dma_size(); 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 * NOTE: Please use ioremap + __raw_read/write where possible instead of these
*/ */
......
...@@ -237,7 +237,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr) ...@@ -237,7 +237,7 @@ static void __init omap_serial_set_port_wakeup(int gpio_nr)
enable_irq_wake(gpio_to_irq(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()) if (!cpu_is_omap16xx())
return 0; return 0;
...@@ -251,7 +251,6 @@ static int __init omap_serial_wakeup_init(void) ...@@ -251,7 +251,6 @@ static int __init omap_serial_wakeup_init(void)
return 0; return 0;
} }
late_initcall(omap_serial_wakeup_init);
#endif /* CONFIG_OMAP_SERIAL_WAKE */ #endif /* CONFIG_OMAP_SERIAL_WAKE */
......
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