aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorMarc Zyngier <Marc.Zyngier@arm.com>2012-01-20 06:24:47 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-23 05:20:07 -0500
commitc214455f3205fa20819da6d67a8b20609ff786e7 (patch)
treecd3a1f9557007ff899ecdd17d1a1f0cc3fd88483 /arch/arm/kernel
parent612539e81f655f6ac73c7af1da8701c1ee618aee (diff)
ARM: 7297/1: smp_twd: make sure timer is stopped before registering it
On secondary CPUs, the Timer Control Register is not reset to a sane value before the timer is registered, and the TRM doesn't seem to indicate any reset value either. In some cases, the kernel will take an interrupt too early, depending on what junk was present in the registers at reset time. The fix is to set the Timer Control Register to 0 before registering the clock_event_device and enabling the interrupt. Problem seen on VE (Cortex A5) and Tegra. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/smp_twd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c
index c8e938553d47..4285daa077b0 100644
--- a/arch/arm/kernel/smp_twd.c
+++ b/arch/arm/kernel/smp_twd.c
@@ -252,6 +252,8 @@ void __cpuinit twd_timer_setup(struct clock_event_device *clk)
252 else 252 else
253 twd_calibrate_rate(); 253 twd_calibrate_rate();
254 254
255 __raw_writel(0, twd_base + TWD_TIMER_CONTROL);
256
255 clk->name = "local_timer"; 257 clk->name = "local_timer";
256 clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT | 258 clk->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT |
257 CLOCK_EVT_FEAT_C3STOP; 259 CLOCK_EVT_FEAT_C3STOP;