[PATCH] arm: Reset SP804 timer when initialising it as a clock events device

Subsystems: arm port, the rest

STALE5702d

2 messages, 2 authors, 2011-01-24 · open the first message on its own page

[PATCH] arm: Reset SP804 timer when initialising it as a clock events device

From: Pawel Moll <hidden>
Date: 2011-01-24 16:39:48

The SP804 driver resets relevant timer when initialising it as
a clock source, but it doesn't do this for clock event device.

Fixed.

Signed-off-by: Pawel Moll <redacted>
---
 arch/arm/common/timer-sp.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/arm/common/timer-sp.c b/arch/arm/common/timer-sp.c
index 6ef3342..e64cad3 100644
--- a/arch/arm/common/timer-sp.c
+++ b/arch/arm/common/timer-sp.c
@@ -142,6 +142,9 @@ void __init sp804_clockevents_init(void __iomem *base, unsigned int timer_irq)
 
 	clkevt_base = base;
 
+	/* Reset the timer to prevent spurious interrupts */
+	writel(0, clkevt_base + TIMER_CTRL);
+
 	evt->irq = timer_irq;
 	evt->mult = div_sc(TIMER_FREQ_KHZ, NSEC_PER_MSEC, evt->shift);
 	evt->max_delta_ns = clockevent_delta2ns(0xffffffff, evt);
-- 
1.6.3.3

[PATCH] arm: Reset SP804 timer when initialising it as a clock events device

From: Russell King - ARM Linux <hidden>
Date: 2011-01-24 16:46:29

On Mon, Jan 24, 2011 at 04:39:48PM +0000, Pawel Moll wrote:
The SP804 driver resets relevant timer when initialising it as
a clock source, but it doesn't do this for clock event device.
NAK.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help