summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2012-08-28 01:26:14 +0300
committerTony Lindgren <tony@atomide.com>2012-08-30 13:19:03 -0700
commit45caae74d238ef6583e9402cb8c550cc0b0f7dbd (patch)
tree1521a205ddd0129b1bf28d000003d692e3c80b02 /arch
parentfea7a08acb13524b47711625eebea40a0ede69a0 (diff)
downloadlinux-45caae74d238ef6583e9402cb8c550cc0b0f7dbd.tar.gz
linux-45caae74d238ef6583e9402cb8c550cc0b0f7dbd.tar.bz2
linux-45caae74d238ef6583e9402cb8c550cc0b0f7dbd.zip
ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
Currently, omap2_sync32k_clocksource_init() function initializes the 32K timer as the system clock source regardless of the CONFIG_OMAP_32K_TIMER setting. Fix this by providing a default implementation for !CONFIG_OMAP_32K_TIMER case. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Reviewed-by: Paul Walmsley <paul@pwsan.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Cc: stable@vger.kernel.org Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/timer.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2ff6d41ec6c6..2ba4f57dda86 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -260,6 +260,7 @@ static u32 notrace dmtimer_read_sched_clock(void)
return 0;
}
+#ifdef CONFIG_OMAP_32K_TIMER
/* Setup free-running counter for clocksource */
static int __init omap2_sync32k_clocksource_init(void)
{
@@ -299,6 +300,12 @@ static int __init omap2_sync32k_clocksource_init(void)
return ret;
}
+#else
+static inline int omap2_sync32k_clocksource_init(void)
+{
+ return -ENODEV;
+}
+#endif
static void __init omap2_gptimer_clocksource_init(int gptimer_id,
const char *fck_source)