Skip to content

Commit

Permalink
ARM: mxs: request clock for timer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Guo committed May 8, 2012
1 parent 7d81397 commit 39d1367
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/arm/mach-mxs/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* MA 02110-1301, USA.
*/

#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/clockchips.h>
Expand Down Expand Up @@ -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);

/*
Expand Down

0 comments on commit 39d1367

Please sign in to comment.