]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: plat-nomadik: Use apb_pclock in mtu driver
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 24 Oct 2012 12:13:41 +0000 (14:13 +0200)
committerMike Turquette <mturquette@linaro.org>
Sat, 10 Nov 2012 01:21:18 +0000 (17:21 -0800)
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
arch/arm/plat-nomadik/timer.c

index 9222e5522a43e97236c86f55c28006c1bea3a8e2..17c690d1f34daca29cc081a5c293c006abb8c480 100644 (file)
@@ -177,9 +177,15 @@ void nmdk_clksrc_reset(void)
 void __init nmdk_timer_init(void __iomem *base)
 {
        unsigned long rate;
-       struct clk *clk0;
+       struct clk *clk0, *pclk0;
 
        mtu_base = base;
+
+       pclk0 = clk_get_sys("mtu0", "apb_pclk");
+       BUG_ON(IS_ERR(pclk0));
+       BUG_ON(clk_prepare(pclk0) < 0);
+       BUG_ON(clk_enable(pclk0) < 0);
+
        clk0 = clk_get_sys("mtu0", NULL);
        BUG_ON(IS_ERR(clk0));
        BUG_ON(clk_prepare(clk0) < 0);