aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-ux500/timer.c')
-rw-r--r--arch/arm/mach-ux500/timer.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/arm/mach-ux500/timer.c b/arch/arm/mach-ux500/timer.c
index d37df98b5c32..52e55337aa9b 100644
--- a/arch/arm/mach-ux500/timer.c
+++ b/arch/arm/mach-ux500/timer.c
@@ -18,8 +18,6 @@
18#include <mach/irqs.h> 18#include <mach/irqs.h>
19 19
20#ifdef CONFIG_HAVE_ARM_TWD 20#ifdef CONFIG_HAVE_ARM_TWD
21static DEFINE_TWD_LOCAL_TIMER(u5500_twd_local_timer,
22 U5500_TWD_BASE, IRQ_LOCALTIMER);
23static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer, 21static DEFINE_TWD_LOCAL_TIMER(u8500_twd_local_timer,
24 U8500_TWD_BASE, IRQ_LOCALTIMER); 22 U8500_TWD_BASE, IRQ_LOCALTIMER);
25 23
@@ -28,8 +26,8 @@ static void __init ux500_twd_init(void)
28 struct twd_local_timer *twd_local_timer; 26 struct twd_local_timer *twd_local_timer;
29 int err; 27 int err;
30 28
31 twd_local_timer = cpu_is_u5500() ? &u5500_twd_local_timer : 29 /* Use this to switch local timer base if changed in new ASICs */
32 &u8500_twd_local_timer; 30 twd_local_timer = &u8500_twd_local_timer;
33 31
34 if (of_have_populated_dt()) 32 if (of_have_populated_dt())
35 twd_local_timer_of_register(); 33 twd_local_timer_of_register();
@@ -48,10 +46,7 @@ static void __init ux500_timer_init(void)
48 void __iomem *mtu_timer_base; 46 void __iomem *mtu_timer_base;
49 void __iomem *prcmu_timer_base; 47 void __iomem *prcmu_timer_base;
50 48
51 if (cpu_is_u5500()) { 49 if (cpu_is_u8500()) {
52 mtu_timer_base = __io_address(U5500_MTU0_BASE);
53 prcmu_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE);
54 } else if (cpu_is_u8500()) {
55 mtu_timer_base = __io_address(U8500_MTU0_BASE); 50 mtu_timer_base = __io_address(U8500_MTU0_BASE);
56 prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE); 51 prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE);
57 } else { 52 } else {
@@ -70,7 +65,7 @@ static void __init ux500_timer_init(void)
70 * depending on delay which is not yet calibrated. RTC-RTT is in the 65 * depending on delay which is not yet calibrated. RTC-RTT is in the
71 * always-on powerdomain and is used as clockevent instead of twd when 66 * always-on powerdomain and is used as clockevent instead of twd when
72 * sleeping. 67 * sleeping.
73 * The PRCMU timer 4(3 for DB5500) register a clocksource and 68 * The PRCMU timer 4 register a clocksource and
74 * sched_clock with higher rating then MTU since is always-on. 69 * sched_clock with higher rating then MTU since is always-on.
75 * 70 *
76 */ 71 */