summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ns9xxx/irq.c
diff options
context:
space:
mode:
authorUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>2007-07-19 22:13:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2007-07-20 10:01:37 +0100
commit26c671c6b7c02bc9f9c42331e6ecbeccdf67164c (patch)
tree6f2c57905817fca9c3650ec8e8fb6253e6ebd0ee /arch/arm/mach-ns9xxx/irq.c
parent3945a567d0c1d6721994a88f58f028c27d8249d2 (diff)
[ARM] 4493/1: ns9xxx: disable a non-reloading timer before ack'ing its irq
The HRM states that is must be done this way ... Signed-off-by: Uwe Kleine-König <ukleinek@informatik.uni-freiburg.de> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ns9xxx/irq.c')
-rw-r--r--arch/arm/mach-ns9xxx/irq.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-ns9xxx/irq.c b/arch/arm/mach-ns9xxx/irq.c
index cd8f8365b62..b8c7b00522e 100644
--- a/arch/arm/mach-ns9xxx/irq.c
+++ b/arch/arm/mach-ns9xxx/irq.c
@@ -21,6 +21,15 @@ static void ns9xxx_ack_irq_timer(unsigned int irq)
{
u32 tc = SYS_TC(irq - IRQ_TIMER0);
+ /*
+ * If the timer is programmed to halt on terminal count, the
+ * timer must be disabled before clearing the interrupt.
+ */
+ if (REGGET(tc, SYS_TCx, REN) == 0) {
+ REGSET(tc, SYS_TCx, TEN, DIS);
+ SYS_TC(irq - IRQ_TIMER0) = tc;
+ }
+
REGSET(tc, SYS_TCx, INTC, SET);
SYS_TC(irq - IRQ_TIMER0) = tc;