summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/time.c
diff options
context:
space:
mode:
authorAlexander Shiyan <shc_work@mail.ru>2014-07-13 09:34:00 +0400
committerShawn Guo <shawn.guo@freescale.com>2014-07-18 16:11:39 +0800
commitfd4959d8779a8e7099c6ecf4f7c854dbf34890e9 (patch)
tree6a26d8b527816a9c59e36e07378e85c60fa33cbb /arch/arm/mach-imx/time.c
parent6befda9a272b98bfb1dc772efc3564644cbfb270 (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.c13
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)
_mxc_timer_init(irq, clk_per, clk_ipg);
}
-void __init mxc_timer_init_dt(struct device_node *np)
+static void __init mxc_timer_init_dt(struct device_node *np)
{
struct clk *clk_per, *clk_ipg;
int irq;
+ if (timer_base)
+ return;
+
timer_base = of_iomap(np, 0);
WARN_ON(!timer_base);
irq = irq_of_parse_and_map(np, 0);
@@ -351,3 +354,11 @@ void __init mxc_timer_init_dt(struct device_node *np)
_mxc_timer_init(irq, clk_per, clk_ipg);
}
+CLOCKSOURCE_OF_DECLARE(mx1_timer, "fsl,imx1-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx25_timer, "fsl,imx25-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx50_timer, "fsl,imx50-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx51_timer, "fsl,imx51-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx53_timer, "fsl,imx53-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6q_timer, "fsl,imx6q-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6sl_timer, "fsl,imx6sl-gpt", mxc_timer_init_dt);
+CLOCKSOURCE_OF_DECLARE(mx6sx_timer, "fsl,imx6sx-gpt", mxc_timer_init_dt);