aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLee Jones <lee.jones@linaro.org>2012-03-16 05:53:24 -0400
committerArnd Bergmann <arnd@arndb.de>2012-03-16 15:48:48 -0400
commit71de5c46e0600b72df58269e80da343e354ddbd7 (patch)
tree5ce4eaefd41211d4c8916eb1c13119db039196c4 /arch
parent15daf691e8e0119e6c21d3ddf6b4754e66e37365 (diff)
ARM: ux500: Provide local timer support for Device Tree
This enables local timer (AKA: private timer) support for all u8500 based hardware using DT. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/db8500.dtsi6
-rw-r--r--arch/arm/mach-ux500/timer.c11
2 files changed, 14 insertions, 3 deletions
diff --git a/arch/arm/boot/dts/db8500.dtsi b/arch/arm/boot/dts/db8500.dtsi
index a81cce0f755e..d73dce645667 100644
--- a/arch/arm/boot/dts/db8500.dtsi
+++ b/arch/arm/boot/dts/db8500.dtsi
@@ -42,6 +42,12 @@
42 interrupts = <0 7 0x4>; 42 interrupts = <0 7 0x4>;
43 }; 43 };
44 44
45 timer@a0410600 {
46 compatible = "arm,cortex-a9-twd-timer";
47 reg = <0xa0410600 0x20>;
48 interrupts = <1 13 0x304>;
49 };
50
45 rtc@80154000 { 51 rtc@80154000 {
46 compatible = "stericsson,db8500-rtc"; 52 compatible = "stericsson,db8500-rtc";
47 reg = <0x80154000 0x1000>; 53 reg = <0x80154000 0x1000>;
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index e9d580702fbb..d37df98b5c32 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -7,6 +7,7 @@
7#include <linux/io.h> 7#include <linux/io.h>
8#include <linux/errno.h> 8#include <linux/errno.h>
9#include <linux/clksrc-dbx500-prcmu.h> 9#include <linux/clksrc-dbx500-prcmu.h>
10#include <linux/of.h>
10 11
11#include <asm/smp_twd.h> 12#include <asm/smp_twd.h>
12 13
@@ -30,9 +31,13 @@ static void __init ux500_twd_init(void)
30 twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : 31 twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer :
31 &u8500_twd_local_timer; 32 &u8500_twd_local_timer;
32 33
33 err = twd_local_timer_register(twd_local_timer); 34 if (of_have_populated_dt())
34 if (err) 35 twd_local_timer_of_register();
35 pr_err("twd_local_timer_register failed %d\n", err); 36 else {
37 err = twd_local_timer_register(twd_local_timer);
38 if (err)
39 pr_err("twd_local_timer_register failed %d\n", err);
40 }
36} 41}
37#else 42#else
38#define ux500_twd_init() do { } while(0) 43#define ux500_twd_init() do { } while(0)