From: Shawn Guo Date: Sat, 28 Apr 2012 16:02:37 +0000 (+0800) Subject: ARM: mxs: request clock for timer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=39d1367e11e406ddb9bcd5f2e4798f3c355db7d9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ARM: mxs: request clock for timer When mxs_timer_init() does not have a timer_clk passed in, it should try to request clock from clkdev system. Signed-off-by: Shawn Guo --- diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c index 564a63279f18..575e8fd6bc79 100644 --- a/arch/arm/mach-mxs/timer.c +++ b/arch/arm/mach-mxs/timer.c @@ -20,6 +20,7 @@ * MA 02110-1301, USA. */ +#include #include #include #include @@ -245,6 +246,14 @@ static int __init mxs_clocksource_init(struct clk *timer_clk) void __init mxs_timer_init(struct clk *timer_clk, int irq) { + if (!timer_clk) { + timer_clk = clk_get_sys("timrot", NULL); + if (IS_ERR(timer_clk)) { + pr_err("%s: failed to get clk\n", __func__); + return; + } + } + clk_prepare_enable(timer_clk); /*