]> git.dujemihanovic.xyz Git - u-boot.git/commit
arm: lib: Add GICV2 driver
authorPatrick Rudolph <patrick.rudolph@9elements.com>
Wed, 23 Oct 2024 13:20:04 +0000 (15:20 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 27 Oct 2024 23:24:13 +0000 (17:24 -0600)
commitdf8d759d9db17b55d6283a9a1d84d196e9cc1dd4
tree83e2418569ce3d87837d330f774deba07962d18b
parent11a86874c0a76a712d130b0aec2bbd1dbffa759d
arm: lib: Add GICV2 driver

Add a generic GICV2 driver that:
- parses the DT and generates the ACPI MADT subtables
- implement of_xlate() and allows irq_get_by_index() to return the
  correct interrupt mappings

Map DT interrupts to ARM GIC interrupts as follows:

- Interrupt numbers ID32-ID1019 are used for SPIs
- ID0-ID15 are used for SGIs
- ID16-ID31 are used for PPIs

TEST: Booted on QEMU raspb4 using GICV2 driver model generated MADT.

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/Kconfig
arch/arm/lib/Makefile
arch/arm/lib/gic-v2.c [new file with mode: 0644]