Skip to content

Commit a4f5385

Browse files
Vineet GuptaKAGA-KOKO
authored andcommitted
clocksource/drivers/arc_timer: Update some comments
TIMER0 interrupt ACK is different for ARC700 and HS3x cores. This came to light in some internal discussions and it is nice to have this documented rather than digging up the PRM (Programmers Reference Manual). Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Vineet Gupta <Vineet.Gupta1@synopsys.com> Cc: linux-snps-arc@lists.infradead.org Link: https://lkml.kernel.org/r/1519241491-12570-1-git-send-email-vgupta@synopsys.com
1 parent 5753405 commit a4f5385

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎drivers/clocksource/arc_timer.c‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,9 +251,14 @@ static irqreturn_t timer_irq_handler(int irq, void *dev_id)
251251
int irq_reenable = clockevent_state_periodic(evt);
252252

253253
/*
254-
* Any write to CTRL reg ACks the interrupt, we rewrite the
255-
* Count when [N]ot [H]alted bit.
256-
* And re-arm it if perioid by [I]nterrupt [E]nable bit
254+
* 1. ACK the interrupt
255+
* - For ARC700, any write to CTRL reg ACKs it, so just rewrite
256+
* Count when [N]ot [H]alted bit.
257+
* - For HS3x, it is a bit subtle. On taken count-down interrupt,
258+
* IP bit [3] is set, which needs to be cleared for ACK'ing.
259+
* The write below can only update the other two bits, hence
260+
* explicitly clears IP bit
261+
* 2. Re-arm interrupt if periodic by writing to IE bit [0]
257262
*/
258263
write_aux_reg(ARC_REG_TIMER0_CTRL, irq_reenable | TIMER_CTRL_NH);
259264

0 commit comments

Comments
 (0)