PCI: aardvark: Use separate INTA interrupt for emulated root bridge
authorPali Rohár <pali@kernel.org>
Mon, 10 Jan 2022 01:50:13 +0000 (02:50 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 8 Feb 2022 10:44:31 +0000 (10:44 +0000)
commit815bc313686783e3a1823ec0efc332c70e6bd976
tree541b889f9eeb62c224f4cbf72fc8f71bdd613fc9
parent273ddd86d67694e3639e3bfe337a96d8861798b8
PCI: aardvark: Use separate INTA interrupt for emulated root bridge

Emulated root bridge currently provides only one Legacy INTA interrupt
which is used for reporting PCIe PME and ERR events and handled by kernel
PCIe PME and AER drivers.

Aardvark HW reports these PME and ERR events separately, so there is no
need to mix real INTA interrupt and emulated INTA interrupt for PCIe PME
and AER drivers.

Register a new advk-RP (as in Root Port) irq chip and a new irq domain
for emulated root bridge and use this new separate irq domain for
providing INTA interrupt from emulated root bridge for PME and ERR events.

The real INTA interrupt from real devices is now separate.

A custom map_irq callback function on PCI host bridge structure is used to
allocate IRQ mapping for emulated root bridge from new irq domain. Original
callback of_irq_parse_and_map_pci() is used for all other devices as before.

Link: https://lore.kernel.org/r/20220110015018.26359-19-kabel@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pci-aardvark.c