OSDN Git Service

irqchip/sifive-plic: Add support for Renesas RZ/Five SoC
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Thu, 30 Jun 2022 10:02:39 +0000 (05:02 -0500)
committerMarc Zyngier <maz@kernel.org>
Fri, 1 Jul 2022 14:27:23 +0000 (15:27 +0100)
commitdd46337ca69662b6912bc230d393c4261d126b8f
treef8c075e4a07c4aa403cb7943ce7a0ed33f6914ef
parent1267d983117178b507b40c516cdcc5cceec553f9
irqchip/sifive-plic: Add support for Renesas RZ/Five SoC

The Renesas RZ/Five SoC has a RISC-V AX45MP AndesCore with NCEPLIC100. The
NCEPLIC100 supports both edge-triggered and level-triggered interrupts. In
case of edge-triggered interrupts NCEPLIC100 ignores the next interrupt
edge until the previous completion message has been received and
NCEPLIC100 doesn't support pending interrupt counter, hence losing the
interrupts if not acknowledged in time.

So the workaround for edge-triggered interrupts to be handled correctly
and without losing is that it needs to be acknowledged first and then
handler must be run so that we don't miss on the next edge-triggered
interrupt.

This patch adds a new compatible string for NCEPLIC100 (from Andes
Technology) interrupt controller found on Renesas RZ/Five SoC and adds
quirk bits to priv structure and implements PLIC_QUIRK_EDGE_INTERRUPT
quirk to change the interrupt flow.

Suggested-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220630100241.35233-3-samuel@sholland.org
drivers/irqchip/irq-sifive-plic.c