diff options
author | grehan <grehan@FreeBSD.org> | 2003-03-03 12:05:06 +0000 |
---|---|---|
committer | grehan <grehan@FreeBSD.org> | 2003-03-03 12:05:06 +0000 |
commit | e58d97a666e757e8429a219da05f88a51554c32c (patch) | |
tree | 22ecdb5eaf5b6062b82019784d990ffb910794d5 /sys | |
parent | 74cf5d6de7730014f656b90ca7684b0279b3d4aa (diff) | |
download | FreeBSD-src-e58d97a666e757e8429a219da05f88a51554c32c.zip FreeBSD-src-e58d97a666e757e8429a219da05f88a51554c32c.tar.gz |
Simplify ofw_pci_fixup(). It doesn't need to be recursive, since the
bridge code already handles IRQ adjustment on the far side of a bridge.
Reviewed by: benno
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/ofw/ofw_pci.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/sys/powerpc/ofw/ofw_pci.c b/sys/powerpc/ofw/ofw_pci.c index 138ae6e..2c9cff5 100644 --- a/sys/powerpc/ofw/ofw_pci.c +++ b/sys/powerpc/ofw/ofw_pci.c @@ -84,26 +84,10 @@ ofw_pci_find_node(device_t dev) void ofw_pci_fixup(device_t dev, u_int bus, phandle_t parentnode) { - phandle_t node, nextnode, childnode; - u_int32_t busrange[2]; - int sz; - - for (node = parentnode; node; node = nextnode) { - sz = OF_getprop(node, "bus-range", busrange, 8); - if (sz != 8 || busrange[0] != device_get_unit(dev)) { - for (childnode = OF_child(node); childnode; - childnode = OF_peer(childnode)) { - fixup_node(dev, childnode); - } - } + phandle_t node; - if ((nextnode = OF_child(node)) != 0) - continue; - while ((nextnode = OF_peer(node)) == 0) { - node = OF_parent(node); - if (node == parentnode) - return; - } + for (node = OF_child(parentnode); node; node = OF_peer(node)) { + fixup_node(dev, node); } } |