From e58d97a666e757e8429a219da05f88a51554c32c Mon Sep 17 00:00:00 2001 From: grehan Date: Mon, 3 Mar 2003 12:05:06 +0000 Subject: [PATCH] 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 --- sys/powerpc/ofw/ofw_pci.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/sys/powerpc/ofw/ofw_pci.c b/sys/powerpc/ofw/ofw_pci.c index 138ae6e951ef..2c9cff58adce 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); } }