]> git.ipfire.org Git - thirdparty/linux.git/commit
irqchip/renesas-rzg2l: Add shared interrupt support
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 25 Mar 2026 19:24:31 +0000 (19:24 +0000)
committerThomas Gleixner <tglx@kernel.org>
Thu, 26 Mar 2026 15:56:24 +0000 (16:56 +0100)
commite0fcae27ff572212c39b1078e7aa0795ce5970e7
tree26967c4ad98e2ea63d65cd7b77b22ebac03ff179
parent98b24d39c852d2498aae24c9aa0a3b11edb8cc2c
irqchip/renesas-rzg2l: Add shared interrupt support

The RZ/G3L SoC has 16 external interrupts, of which 8 are shared with TINT
(GPIO interrupts), whereas RZ/G2L has only 8 external interrupts with no
sharing. The shared interrupt line selection between external interrupt and
GPIO interrupt is based on the INTTSEL register. Add shared_irq_cnt
variable to struct rzg2l_hw_info handle these differences.

Add used_irqs bitmap to struct rzg2l_irqc_priv to track allocation state.
In the alloc callback, use test_and_set_bit() to enforce mutual exclusion
and configure the INTTSEL register to route to either the external
interrupt or TINT. In the free callback, use test_and_clear_bit() to
release the shared interrupt line and reset the INTTSEL. Also add INTTSEL
register save/restore support to the suspend/resume path.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260325192451.172562-17-biju.das.jz@bp.renesas.com
drivers/irqchip/irq-renesas-rzg2l.c