Increase interrupt cells in generic_pcie_fdt_route_interrupt

ARM GIC specification in device trees use 3 cells, so the current
limit of 2 causes the last cell to be dropped. This in turn can
cause the interrupt polarity and trigger settings to be incorrect.

Increase the limit to 4 which should handle all reasonable cases.
This fixes issues seen in QEMU when registering PCI interrupts.
This commit is contained in:
Jayachandran C. 2016-12-12 15:17:56 +00:00
parent 8a030e9c6e
commit 7d9082cafa

View file

@ -269,7 +269,7 @@ generic_pcie_fdt_route_interrupt(device_t bus, device_t dev, int pin)
{
struct generic_pcie_fdt_softc *sc;
struct ofw_pci_register reg;
uint32_t pintr, mintr[2];
uint32_t pintr, mintr[4];
phandle_t iparent;
int intrcells;