aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2012-04-28 12:02:37 -0400
committerShawn Guo <shawn.guo@linaro.org>2012-05-08 12:02:39 -0400
commit39d1367e11e406ddb9bcd5f2e4798f3c355db7d9 (patch)
treedbb5eb076cd1268d1e52529afe3d351755d9bb86 /arch
parent7d81397cd93da2850e0aec54c3ba4eb4908a675b (diff)
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 <shawn.guo@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-mxs/timer.c9
1 files changed, 9 insertions, 0 deletions
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 @@
20 * MA 02110-1301, USA. 20 * MA 02110-1301, USA.
21 */ 21 */
22 22
23#include <linux/err.h>
23#include <linux/interrupt.h> 24#include <linux/interrupt.h>
24#include <linux/irq.h> 25#include <linux/irq.h>
25#include <linux/clockchips.h> 26#include <linux/clockchips.h>
@@ -245,6 +246,14 @@ static int __init mxs_clocksource_init(struct clk *timer_clk)
245 246
246void __init mxs_timer_init(struct clk *timer_clk, int irq) 247void __init mxs_timer_init(struct clk *timer_clk, int irq)
247{ 248{
249 if (!timer_clk) {
250 timer_clk = clk_get_sys("timrot", NULL);
251 if (IS_ERR(timer_clk)) {
252 pr_err("%s: failed to get clk\n", __func__);
253 return;
254 }
255 }
256
248 clk_prepare_enable(timer_clk); 257 clk_prepare_enable(timer_clk);
249 258
250 /* 259 /*