Commit 71de5c46 authored by Lee Jones's avatar Lee Jones Committed by Arnd Bergmann

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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 15daf691
...@@ -42,6 +42,12 @@ pmu { ...@@ -42,6 +42,12 @@ pmu {
interrupts = <0 7 0x4>; interrupts = <0 7 0x4>;
}; };
timer@a0410600 {
compatible = "arm,cortex-a9-twd-timer";
reg = <0xa0410600 0x20>;
interrupts = <1 13 0x304>;
};
rtc@80154000 { rtc@80154000 {
compatible = "stericsson,db8500-rtc"; compatible = "stericsson,db8500-rtc";
reg = <0x80154000 0x1000>; reg = <0x80154000 0x1000>;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/clksrc-dbx500-prcmu.h> #include <linux/clksrc-dbx500-prcmu.h>
#include <linux/of.h>
#include <asm/smp_twd.h> #include <asm/smp_twd.h>
...@@ -30,9 +31,13 @@ static void __init ux500_twd_init(void) ...@@ -30,9 +31,13 @@ static void __init ux500_twd_init(void)
twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer :
&u8500_twd_local_timer; &u8500_twd_local_timer;
err = twd_local_timer_register(twd_local_timer); if (of_have_populated_dt())
if (err) twd_local_timer_of_register();
pr_err("twd_local_timer_register failed %d\n", err); else {
err = twd_local_timer_register(twd_local_timer);
if (err)
pr_err("twd_local_timer_register failed %d\n", err);
}
} }
#else #else
#define ux500_twd_init() do { } while(0) #define ux500_twd_init() do { } while(0)
......
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