Skip to content

Commit ff4f09d

Browse files
bijudasgregkh
authored andcommitted
irqchip/renesas-rzv2h: Prevent TINT spurious interrupt
[ Upstream commit 28e89cd ] A spurious TINT interrupt is seen during boot on RZ/G3E SMARC EVK. A glitch in the edge detection circuit can cause a spurious interrupt. Clear the status flag after setting the ICU_TSSRk registers, which is recommended in the hardware manual as a countermeasure. Fixes: 0d7605e ("irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver") Signed-off-by: Biju Das <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent f274e16 commit ff4f09d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

drivers/irqchip/irq-renesas-rzv2h.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,14 @@ static void rzv2h_tint_irq_endisable(struct irq_data *d, bool enable)
155155
else
156156
tssr &= ~ICU_TSSR_TIEN(tssel_n);
157157
writel_relaxed(tssr, priv->base + priv->info->t_offs + ICU_TSSR(k));
158+
159+
/*
160+
* A glitch in the edge detection circuit can cause a spurious
161+
* interrupt. Clear the status flag after setting the ICU_TSSRk
162+
* registers, which is recommended by the hardware manual as a
163+
* countermeasure.
164+
*/
165+
writel_relaxed(BIT(tint_nr), priv->base + priv->info->t_offs + ICU_TSCLR);
158166
}
159167

160168
static void rzv2h_icu_irq_disable(struct irq_data *d)

0 commit comments

Comments
 (0)