Davinci: enable timer clock before use
authorCyril Chemparathy <cyril@ti.com>
Thu, 25 Mar 2010 21:43:45 +0000 (17:43 -0400)
committerKevin Hilman <khilman@deeprootsystems.com>
Thu, 6 May 2010 22:02:03 +0000 (15:02 -0700)
timer_init() programs timer64 hardware.  The module should ideally be brought
out of reset before this happens.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
arch/arm/mach-davinci/time.c

index 9e0b106b4f5f5895981f0b02a439a00e79565303..b21f7633d9a8e05953e7b611e2df345540c3e74b 100644 (file)
@@ -361,13 +361,13 @@ static void __init davinci_timer_init(void)
                }
        }
 
-       /* init timer hw */
-       timer_init();
-
        timer_clk = clk_get(NULL, "timer0");
        BUG_ON(IS_ERR(timer_clk));
        clk_enable(timer_clk);
 
+       /* init timer hw */
+       timer_init();
+
        davinci_clock_tick_rate = clk_get_rate(timer_clk);
 
        /* setup clocksource */