diff options
author | Lee Jones <lee.jones@linaro.org> | 2012-03-16 09:53:24 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-03-16 19:48:48 +0000 |
commit | 71de5c46e0600b72df58269e80da343e354ddbd7 (patch) | |
tree | 5ce4eaefd41211d4c8916eb1c13119db039196c4 /arch/arm/mach-ux500 | |
parent | 15daf691e8e0119e6c21d3ddf6b4754e66e37365 (diff) | |
download | blackbird-op-linux-71de5c46e0600b72df58269e80da343e354ddbd7.tar.gz blackbird-op-linux-71de5c46e0600b72df58269e80da343e354ddbd7.zip |
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/arm/mach-ux500')
-rw-r--r-- | arch/arm/mach-ux500/timer.c | 11 |
1 files changed, 8 insertions, 3 deletions
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 @@ #include <linux/io.h> #include <linux/errno.h> #include <linux/clksrc-dbx500-prcmu.h> +#include <linux/of.h> #include <asm/smp_twd.h> @@ -30,9 +31,13 @@ static void __init ux500_twd_init(void) twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : &u8500_twd_local_timer; - err = twd_local_timer_register(twd_local_timer); - if (err) - pr_err("twd_local_timer_register failed %d\n", err); + if (of_have_populated_dt()) + twd_local_timer_of_register(); + else { + err = twd_local_timer_register(twd_local_timer); + if (err) + pr_err("twd_local_timer_register failed %d\n", err); + } } #else #define ux500_twd_init() do { } while(0) |