PERFORCE change 176864 for review
Rafal Jaworowski
raj at FreeBSD.org
Tue Apr 13 15:17:54 UTC 2010
http://p4web.freebsd.org/@@176864?ac=10
Change 176864 by raj at raj_fdt on 2010/04/13 15:17:08
Retrieve interrupt routing info from the DT on MPC85XX PCI(E).
This lets PCI(E) fully work off the device tree blob on these
platforms as well.
Affected files ...
.. //depot/projects/fdt/sys/powerpc/mpc85xx/pci_fdt.c#2 edit
Differences ...
==== //depot/projects/fdt/sys/powerpc/mpc85xx/pci_fdt.c#2 (text+ko) ====
@@ -282,7 +282,7 @@
#define PCI_INTRS 12
/* Configure PCI interrupt pins */
for (int i = 0; i < PCI_INTRS; i++)
- powerpc_config_intr(i, INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
+ powerpc_config_intr(PIC_IRQ_EXT(i), INTR_TRIGGER_LEVEL, INTR_POLARITY_LOW);
node = ofw_bus_get_node(dev);
/*
@@ -568,9 +568,11 @@
fsl_pcib_route_int(struct fsl_pcib_softc *sc, u_int bus, u_int slot, u_int func,
u_int intpin)
{
- int unit = device_get_unit(sc->sc_dev);
+ int err, unit;
u_int devfn, intline;
+ unit = device_get_unit(sc->sc_dev);
+
devfn = DEVFN(bus, slot, func);
if (devfn == sc->sc_devfn_via_ide)
intline = 14;
@@ -585,9 +587,12 @@
intline += (bus != sc->sc_busnr) ? slot : 0;
intline = PIC_IRQ_EXT(intline & 3);
#endif
- intline = intpin - 1;
- intline += (4 * unit);
- intline = PIC_IRQ_EXT(intline & 0x0f);
+ err = fdt_pci_route_intr(bus, slot, func, intpin,
+ &sc->sc_intr_info, &intline);
+ if (err == 0)
+ intline = PIC_IRQ_EXT(intline & 0x0f);
+ else
+ intline = 0xff;
} else
intline = 0xff;
}
More information about the p4-projects
mailing list