From d5da94b88efebc375bfcbab6bb0e59a6e8a6571e Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Fri, 11 Oct 2013 17:28:04 -0700 Subject: [PATCH] ARM: OMAP2+: Fix build error for realtime counter init if not enabled Otherwise we can get an error with some configs: arch/arm/mach-omap2/timer.c:73: undefined reference to `omap_smc1' Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/timer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 87259dc82aa..d59b51f07cf 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -66,12 +66,15 @@ static struct omap_dm_timer clkev; static struct clock_event_device clockevent_gpt; + +#ifdef CONFIG_SOC_HAS_REALTIME_COUNTER static unsigned long arch_timer_freq; void set_cntfreq(void) { omap_smc1(OMAP5_DRA7_MON_SET_CNTFRQ_INDEX, arch_timer_freq); } +#endif static irqreturn_t omap2_gp_timer_interrupt(int irq, void *dev_id) { -- 2.43.2