ARM: OMAP2+: Fix fallout from localtimer divorce and SMP=n
A recent patch ef3160c (ARM: OMAP2+: Divorce from local timer API,
2013-03-04) broke the omap build when SMP=n because the TWD functions
are only compiled on SMP=y builds. Stub out the TWD calls when the TWD
isn't built in to to keep everything building.
arch/arm/mach-omap2/built-in.o: In function `omap4_local_timer_init':
dss-common.c:(.init.text+0x1d90): undefined reference to `twd_local_timer_register'
Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 8e99ca3..5a9ee0b4 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -600,6 +600,7 @@
#endif
#ifdef CONFIG_ARCH_OMAP4
+#ifdef CONFIG_HAVE_ARM_TWD
static DEFINE_TWD_LOCAL_TIMER(twd_local_timer, OMAP44XX_LOCAL_TWD_BASE, 29);
void __init omap4_local_timer_init(void)
{
@@ -618,6 +619,12 @@
pr_err("twd_local_timer_register failed %d\n", err);
}
}
+#else
+void __init omap4_local_timer_init(void)
+{
+ omap4_sync32k_timer_init();
+}
+#endif /* CONFIG_HAVE_ARM_TWD */
#endif /* CONFIG_ARCH_OMAP4 */
#ifdef CONFIG_SOC_OMAP5