summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/timer.c
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2012-07-04 13:02:32 (GMT)
committerBenoit Cousson <b-cousson@ti.com>2012-09-07 17:18:43 (GMT)
commiteed0de27726a55f145490619510c8ec58c9dc767 (patch)
tree76cd4609a74b50cbc059eefb30a65dd2aee0118c /arch/arm/mach-omap2/timer.c
parent926fd45ba9eeb4c3d0454b934161ee884dd82a22 (diff)
downloadlinux-fsl-qoriq-eed0de27726a55f145490619510c8ec58c9dc767.tar.xz
ARM: OMAP4: Add local timer support for Device Tree
Add cortex-a9 local timer support for all OMAP4 based SOCs using DT. Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/timer.c')
-rw-r--r--arch/arm/mach-omap2/timer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c
index 2ff6d41..31f9c93 100644
--- a/arch/arm/mach-omap2/timer.c
+++ b/arch/arm/mach-omap2/timer.c
@@ -36,6 +36,7 @@
#include <linux/clocksource.h>
#include <linux/clockchips.h>
#include <linux/slab.h>
+#include <linux/of.h>
#include <asm/mach/time.h>
#include <plat/dmtimer.h>
@@ -386,6 +387,11 @@ static void __init omap4_timer_init(void)
if (omap_rev() != OMAP4430_REV_ES1_0) {
int err;
+ if (of_have_populated_dt()) {
+ twd_local_timer_of_register();
+ return;
+ }
+
err = twd_local_timer_register(&twd_local_timer);
if (err)
pr_err("twd_local_timer_register failed %d\n", err);