]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
irqchip/renesas-rzv2h: Prevent TINT spurious interrupt
authorBiju Das <biju.das.jz@bp.renesas.com>
Tue, 15 Apr 2025 10:33:41 +0000 (11:33 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Apr 2025 12:29:38 +0000 (14:29 +0200)
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: 0d7605e75ac2 ("irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
drivers/irqchip/irq-renesas-rzv2h.c

index 3d5b5fdf9bde823cc4942961890a009c26e356b1..0f0fd7d4dfdf2c0808f59b00bae123e2aeebfc4b 100644 (file)
@@ -170,6 +170,14 @@ static void rzv2h_tint_irq_endisable(struct irq_data *d, bool enable)
        else
                tssr &= ~ICU_TSSR_TIEN(tssel_n, priv->info->field_width);
        writel_relaxed(tssr, priv->base + priv->info->t_offs + ICU_TSSR(k));
+
+       /*
+        * 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 by the hardware manual as a
+        * countermeasure.
+        */
+       writel_relaxed(BIT(tint_nr), priv->base + priv->info->t_offs + ICU_TSCLR);
 }
 
 static void rzv2h_icu_irq_disable(struct irq_data *d)