aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-imx/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-imx/time.c')
-rw-r--r--arch/arm/mach-imx/time.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/time.c b/arch/arm/mach-imx/time.c
index 65222ea0df6d..bed081e58262 100644
--- a/arch/arm/mach-imx/time.c
+++ b/arch/arm/mach-imx/time.c
@@ -28,6 +28,9 @@
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/sched_clock.h> 30#include <linux/sched_clock.h>
31#include <linux/of.h>
32#include <linux/of_address.h>
33#include <linux/of_irq.h>
31 34
32#include <asm/mach/time.h> 35#include <asm/mach/time.h>
33 36
@@ -328,3 +331,15 @@ void __init mxc_timer_init(void __iomem *base, int irq)
328 /* Make irqs happen */ 331 /* Make irqs happen */
329 setup_irq(irq, &mxc_timer_irq); 332 setup_irq(irq, &mxc_timer_irq);
330} 333}
334
335void __init mxc_timer_init_dt(struct device_node *np)
336{
337 void __iomem *base;
338 int irq;
339
340 base = of_iomap(np, 0);
341 WARN_ON(!base);
342 irq = irq_of_parse_and_map(np, 0);
343
344 mxc_timer_init(base, irq);
345}