[ 045/218] ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER

From: Greg Kroah-Hartman
Date: Fri Sep 28 2012 - 17:49:24 EST


3.4-stable review patch. If anyone has any objections, please let me know.

------------------

From: Igor Grinberg <grinberg@xxxxxxxxxxxxxx>

commit 45caae74d238ef6583e9402cb8c550cc0b0f7dbd upstream.

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@xxxxxxxxxxxxxx>
Reviewed-by: Paul Walmsley <paul@xxxxxxxxx>
Acked-by: Santosh Shilimkar <santosh.shilimkar@xxxxxx>
Signed-off-by: Tony Lindgren <tony@xxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
arch/arm/mach-omap2/timer.c | 7 +++++++
1 file changed, 7 insertions(+)

--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -275,6 +275,7 @@ static u32 notrace dmtimer_read_sched_cl
return 0;
}

+#ifdef CONFIG_OMAP_32K_TIMER
/* Setup free-running counter for clocksource */
static void __init omap2_gp_clocksource_init(int gptimer_id,
const char *fck_source)
@@ -304,6 +305,12 @@ static void __init omap##name##_timer_in
omap2_gp_clockevent_init((clkev_nr), clkev_src); \
omap2_gp_clocksource_init((clksrc_nr), clksrc_src); \
}
+#else
+static inline int omap2_sync32k_clocksource_init(void)
+{
+ return -ENODEV;
+}
+#endif

#define OMAP_SYS_TIMER(name) \
struct sys_timer omap##name##_timer = { \


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/