aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2013-05-08 19:48:01 -0400
committerTony Lindgren <tony@atomide.com>2013-05-08 19:48:01 -0400
commite7e17c538604928b98107a08c2c5dc54745d85fe (patch)
tree3e277bae6459688563e7aaf3340331e5aefc2b4e /arch/arm/mach-omap2
parente65f131a14726e5f1b880a528271a52428e5b3a5 (diff)
ARM: OMAP2+: omap_device: use late_initcall_sync
If DEBUG_LL and earlyprintk are enabled, and omap-serial.c is compiled as a module, the kernel boot hangs early as the clocks for serial port are cut while earlyprintk still uses the port. The problem is a race between the late_initcall for omap_device (which idles devices that have no drivers) and the late_initcall in kernel/printk.c which turns off the earlyconsole. Any printks that happen between this omap_device late initcall and the earlyconsole late initcall will crash when accessing the UART. The fix is to ensure the omap_device initcall happens after the earlyconsole initcall. Reported-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/omap_device.c2
-rw-r--r--arch/arm/mach-omap2/soc.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index eeea4fa28fbc..e6d230700b2b 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -876,4 +876,4 @@ static int __init omap_device_late_init(void)
876 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle); 876 bus_for_each_dev(&platform_bus_type, NULL, NULL, omap_device_late_idle);
877 return 0; 877 return 0;
878} 878}
879omap_late_initcall(omap_device_late_init); 879omap_late_initcall_sync(omap_device_late_init);
diff --git a/arch/arm/mach-omap2/soc.h b/arch/arm/mach-omap2/soc.h
index 18fdeeb3a44a..ea89594b7afa 100644
--- a/arch/arm/mach-omap2/soc.h
+++ b/arch/arm/mach-omap2/soc.h
@@ -496,6 +496,7 @@ level(__##fn);
496#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn) 496#define omap_subsys_initcall(fn) omap_initcall(subsys_initcall, fn)
497#define omap_device_initcall(fn) omap_initcall(device_initcall, fn) 497#define omap_device_initcall(fn) omap_initcall(device_initcall, fn)
498#define omap_late_initcall(fn) omap_initcall(late_initcall, fn) 498#define omap_late_initcall(fn) omap_initcall(late_initcall, fn)
499#define omap_late_initcall_sync(fn) omap_initcall(late_initcall_sync, fn)
499 500
500#endif /* __ASSEMBLY__ */ 501#endif /* __ASSEMBLY__ */
501 502