Skip to content

Commit

Permalink
ARM: OMAP: timer: obey the !CONFIG_OMAP_32K_TIMER
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Igor Grinberg authored and Tony Lindgren committed Aug 30, 2012
1 parent fea7a08 commit 45caae7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 45caae7

Please sign in to comment.