mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
irqchip/renesas-rzv2h: Preserve TIEN state in rzv2h_tint_set_type()
rzv2h_tint_set_type() clears TIEN while switching the TINT source and
then unconditionally sets it again, enabling the interrupt even if it
was disabled before the call.
Restore the previous TIEN state instead of forcing it on.
Fixes: 0d7605e75a ("irqchip: Add RZ/V2H(P) Interrupt Control Unit (ICU) driver")
Signed-off-by: Au Dang <au.dang.jx@renesas.com>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261014095927.635132-1-tommaso.merciai.xr@bp.renesas.com
This commit is contained in:
parent
0a0cdf87d0
commit
42bedd4af8
|
|
@ -420,9 +420,9 @@ static void rzv2h_clear_tint_int(struct rzv2h_icu_priv *priv, unsigned int hwirq
|
|||
static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
|
||||
{
|
||||
u32 titsr, titsr_k, titsel_n, tien;
|
||||
u32 titsr_cur, tssr_cur, tien_cur;
|
||||
struct rzv2h_icu_priv *priv;
|
||||
u32 tssr, tssr_k, tssel_n;
|
||||
u32 titsr_cur, tssr_cur;
|
||||
unsigned int hwirq;
|
||||
u32 tint, sense;
|
||||
int tint_nr;
|
||||
|
|
@ -477,6 +477,8 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
|
|||
if (tssr_cur == tint && titsr_cur == sense)
|
||||
goto set_parent_type;
|
||||
|
||||
tien_cur = tssr & tien;
|
||||
|
||||
tssr &= ~(ICU_TSSR_TSSEL_MASK(tssel_n, priv->info->field_width) | tien);
|
||||
tssr |= ICU_TSSR_TSSEL_PREP(tint, tssel_n, priv->info->field_width);
|
||||
|
||||
|
|
@ -489,7 +491,7 @@ static int rzv2h_tint_set_type(struct irq_data *d, unsigned int type)
|
|||
|
||||
rzv2h_clear_tint_int(priv, hwirq);
|
||||
|
||||
writel_relaxed(tssr | tien, priv->base + priv->info->t_offs + ICU_TSSR(tssr_k));
|
||||
writel_relaxed(tssr | tien_cur, priv->base + priv->info->t_offs + ICU_TSSR(tssr_k));
|
||||
}
|
||||
set_parent_type:
|
||||
return irq_chip_set_type_parent(d, IRQ_TYPE_LEVEL_HIGH);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user