Commit eed0de27 authored by Santosh Shilimkar's avatar Santosh Shilimkar Committed by Benoit Cousson

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: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Acked-by: default avatarFelipe Balbi <balbi@ti.com>
Signed-off-by: default avatarBenoit Cousson <b-cousson@ti.com>
parent 926fd45b
...@@ -45,6 +45,12 @@ L2: l2-cache-controller@48242000 { ...@@ -45,6 +45,12 @@ L2: l2-cache-controller@48242000 {
cache-level = <2>; cache-level = <2>;
}; };
local-timer@0x48240600 {
compatible = "arm,cortex-a9-twd-timer";
reg = <0x48240600 0x20>;
interrupts = <1 13 0x304>;
};
/* /*
* The soc node represents the soc top level view. It is uses for IPs * The soc node represents the soc top level view. It is uses for IPs
* that are not memory mapped in the MPU view or for the MPU itself. * that are not memory mapped in the MPU view or for the MPU itself.
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <linux/clocksource.h> #include <linux/clocksource.h>
#include <linux/clockchips.h> #include <linux/clockchips.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
#include <plat/dmtimer.h> #include <plat/dmtimer.h>
...@@ -386,6 +387,11 @@ static void __init omap4_timer_init(void) ...@@ -386,6 +387,11 @@ static void __init omap4_timer_init(void)
if (omap_rev() != OMAP4430_REV_ES1_0) { if (omap_rev() != OMAP4430_REV_ES1_0) {
int err; int err;
if (of_have_populated_dt()) {
twd_local_timer_of_register();
return;
}
err = twd_local_timer_register(&twd_local_timer); err = twd_local_timer_register(&twd_local_timer);
if (err) if (err)
pr_err("twd_local_timer_register failed %d\n", err); pr_err("twd_local_timer_register failed %d\n", err);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment