diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2014-07-13 01:34:00 -0400 |
---|---|---|
committer | Shawn Guo <shawn.guo@freescale.com> | 2014-07-18 04:11:39 -0400 |
commit | fd4959d8779a8e7099c6ecf4f7c854dbf34890e9 (patch) | |
tree | 6a26d8b527816a9c59e36e07378e85c60fa33cbb /arch/arm/mach-imx/time.c | |
parent | 6befda9a272b98bfb1dc772efc3564644cbfb270 (diff) |
ARM: i.MX: Use CLOCKSOURCE_OF_DECLARE() for DT targets
This patch uses clocksource_of_init() call for DT targets.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Shawn Guo <shawn.guo@freescale.com>
Diffstat (limited to 'arch/arm/mach-imx/time.c')
-rw-r--r-- | arch/arm/mach-imx/time.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c index 1da2270f5716..bf92e5a351c0 100644 --- a/arch/arm/mach-imx/time.c +++ b/arch/arm/mach-imx/time.c | |||
@@ -337,11 +337,14 @@ void __init mxc_timer_init(void __iomem *base, int irq) | |||
337 | _mxc_timer_init(irq, clk_per, clk_ipg); | 337 | _mxc_timer_init(irq, clk_per, clk_ipg); |
338 | } | 338 | } |
339 | 339 | ||
340 | void __init mxc_timer_init_dt(struct device_node *np) | 340 | static void __init mxc_timer_init_dt(struct device_node *np) |
341 | { | 341 | { |
342 | struct clk *clk_per, *clk_ipg; | 342 | struct clk *clk_per, *clk_ipg; |
343 | int irq; | 343 | int irq; |
344 | 344 | ||
345 | if (timer_base) | ||
346 | return; | ||
347 | |||
345 | timer_base = of_iomap(np, 0); | 348 | timer_base = of_iomap(np, 0); |
346 | WARN_ON(!timer_base); | 349 | WARN_ON(!timer_base); |
347 | irq = irq_of_parse_and_map(np, 0); | 350 | irq = irq_of_parse_and_map(np, 0); |
@@ -351,3 +354,11 @@ void __init mxc_timer_init_dt(struct device_node *np) | |||
351 | 354 | ||
352 | _mxc_timer_init(irq, clk_per, clk_ipg); | 355 | _mxc_timer_init(irq, clk_per, clk_ipg); |
353 | } | 356 | } |
357 | CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt); | ||
358 | CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt); | ||
359 | CLOCKSOURCE_OF_DECLARE(mx50_timer, "fsl,imx50-gpt", mxc_timer_init_dt); | ||
360 | CLOCKSOURCE_OF_DECLARE(mx51_timer, "fsl,imx51-gpt", mxc_timer_init_dt); | ||
361 | CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt); | ||
362 | CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt); | ||
363 | CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt); | ||
364 | CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt); | ||