]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
irqchip/renesas-rzg2l: Implement restriction when writing ISCR register
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Mon, 20 Nov 2023 11:18:16 +0000 (13:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 3 Apr 2024 13:28:51 +0000 (15:28 +0200)
commitc15a37e3f1620cb91fdcca8c2e4fc3c53de6c83d
tree29c07f3de1cafb318de7cbbc4c0aebbbeeb861d2
parentea4c338cfefaaee8b13257c6d7f20efa326e6130
irqchip/renesas-rzg2l: Implement restriction when writing ISCR register

[ Upstream commit ef88eefb1a81a8701eabb7d5ced761a66a465a49 ]

The RZ/G2L manual (chapter "IRQ Status Control Register (ISCR)") describes
the operation to clear interrupts through the ISCR register as follows:

[Write operation]

  When "Falling-edge detection", "Rising-edge detection" or
  "Falling/Rising-edge detection" is set in IITSR:

    - In case ISTAT is 1
0: IRQn interrupt detection status is cleared.
1: Invalid to write.
    - In case ISTAT is 0
Invalid to write.

  When "Low-level detection" is set in IITSR.:
        Invalid to write.

Take the interrupt type into account when clearing interrupts through the
ISCR register to avoid writing the ISCR when the interrupt type is level.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20231120111820.87398-6-claudiu.beznea.uj@bp.renesas.com
Stable-dep-of: 9eec61df55c5 ("irqchip/renesas-rzg2l: Flush posted write in irq_eoi()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/irqchip/irq-renesas-rzg2l.c