Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39d1367e authored by Shawn Guo's avatar Shawn Guo
Browse files

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: default avatarShawn Guo <shawn.guo@linaro.org>
parent 7d81397c
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
 * MA 02110-1301, USA.
 */

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

	/*