diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2013-03-25 07:53:08 +0100 |
---|---|---|
committer | Shawn Guo <shawn.guo@linaro.org> | 2013-04-01 10:30:01 +0200 |
commit | 633ef4c7d18982d184242d42056c622a433d93fe (patch) | |
tree | 083c25c02198299cd32d855ffd4b35224e4f7771 /arch/arm/mach-mxs/timer.c | |
parent | Merge remote-tracking branch 'arm-soc/clksrc/cleanup' into mxs/cleanup (diff) | |
download | linux-633ef4c7d18982d184242d42056c622a433d93fe.tar.xz linux-633ef4c7d18982d184242d42056c622a433d93fe.zip |
ARM: mxs: use CLKSRC_OF helper to initialize timer
Select CLKSRC_OF and use clocksource_of_init() to initialize timer, so
that the call to mxs_timer_init() in clock driver can be removed.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Diffstat (limited to 'arch/arm/mach-mxs/timer.c')
-rw-r--r-- | arch/arm/mach-mxs/timer.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/mach-mxs/timer.c b/arch/arm/mach-mxs/timer.c index 421020498a1b..fe2903d7939a 100644 --- a/arch/arm/mach-mxs/timer.c +++ b/arch/arm/mach-mxs/timer.c @@ -242,18 +242,11 @@ static int __init mxs_clocksource_init(struct clk *timer_clk) return 0; } -void __init mxs_timer_init(void) +static void __init mxs_timer_init(struct device_node *np) { - struct device_node *np; struct clk *timer_clk; int irq; - np = of_find_compatible_node(NULL, NULL, "fsl,timrot"); - if (!np) { - pr_err("%s: failed find timrot node\n", __func__); - return; - } - timer_clk = clk_get_sys("timrot", NULL); if (IS_ERR(timer_clk)) { pr_err("%s: failed to get clk\n", __func__); @@ -304,3 +297,4 @@ void __init mxs_timer_init(void) irq = irq_of_parse_and_map(np, 0); setup_irq(irq, &mxs_timer_irq); } +CLOCKSOURCE_OF_DECLARE(mxs, "fsl,timrot", mxs_timer_init) |