Commit 8bc8bf07 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Fix source clock for timer-gp.c

The source clock should be sys_ck, not osc_ck as pointed out by
Richard Woodruff
parent b6a39cb1
...@@ -92,20 +92,20 @@ static struct irqaction omap2_gp_timer_irq = { ...@@ -92,20 +92,20 @@ static struct irqaction omap2_gp_timer_irq = {
static void __init omap2_gp_timer_init(void) static void __init omap2_gp_timer_init(void)
{ {
struct clk * osc_ck; struct clk * sys_ck;
u32 tick_period = 120000; u32 tick_period = 120000;
u32 l; u32 l;
/* Reset clock and prescale value */ /* Reset clock and prescale value */
timer_write_reg(OS_TIMER_NR, GP_TIMER_TCLR, 0); timer_write_reg(OS_TIMER_NR, GP_TIMER_TCLR, 0);
osc_ck = clk_get(NULL, "osc_ck"); sys_ck = clk_get(NULL, "sys_ck");
if (IS_ERR(osc_ck)) if (IS_ERR(sys_ck))
printk(KERN_ERR "Could not get osc_ck\n"); printk(KERN_ERR "Could not get sys_ck\n");
else { else {
clk_use(osc_ck); clk_use(sys_ck);
tick_period = clk_get_rate(osc_ck) / 100; tick_period = clk_get_rate(sys_ck) / 100;
clk_put(osc_ck); clk_put(sys_ck);
} }
tick_period /= 2; /* Minimum prescale divider is 2 */ tick_period /= 2; /* Minimum prescale divider is 2 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment