PERFORCE change 153060 for review
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun Nov 16 14:59:58 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=153060
Change 153060 by nwhitehorn at nwhitehorn_trantor on 2008/11/16 22:59:28
Fix interrupt-cells detection on Grackle.
Affected files ...
.. //depot/projects/ppc-g5/sys/powerpc/powermac/grackle.c#7 edit
Differences ...
==== //depot/projects/ppc-g5/sys/powerpc/powermac/grackle.c#7 (text+ko) ====
@@ -255,10 +255,12 @@
ofw_bus_setup_iinfo(node, &sc->sc_pci_iinfo, sizeof(cell_t));
/* We need the number of interrupt cells to read the imap */
- sc->sc_icells = 2;
- if (OF_getprop(node, "interrupt-parent", &iparent,sizeof(iparent)) > 0)
- OF_getprop(iparent,"#interrupt-cells",&sc->sc_icells,
- sizeof(sc->sc_icells));
+ if (OF_getprop(node, "interrupt-parent", &iparent,sizeof(iparent)) <= 0)
+ iparent = node;
+
+ if (OF_getprop(iparent,"#interrupt-cells",&sc->sc_icells,
+ sizeof(sc->sc_icells)) <= 0);
+ sc->sc_icells = 1;
device_add_child(dev, "pci", device_get_unit(dev));
return (bus_generic_attach(dev));
More information about the p4-projects
mailing list