Skip to content

Commit

Permalink
ARM: OMAP4: Add local timer support for Device Tree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Shilimkar authored and Benoit Cousson committed Sep 7, 2012
1 parent 926fd45 commit eed0de2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/boot/dts/omap4.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@
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
* that are not memory mapped in the MPU view or for the MPU itself.
Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-omap2/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit eed0de2

Please sign in to comment.