Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26c671c6 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Russell King
Browse files

[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: default avatarUwe Kleine-König <ukleinek@informatik.uni-freiburg.de>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 3945a567
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -21,6 +21,15 @@ static void ns9xxx_ack_irq_timer(unsigned int irq)
{
{
	u32 tc = SYS_TC(irq - IRQ_TIMER0);
	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);
	REGSET(tc, SYS_TCx, INTC, SET);
	SYS_TC(irq - IRQ_TIMER0) = tc;
	SYS_TC(irq - IRQ_TIMER0) = tc;