Thread (14 messages) flat view 14 messages, 4 authors, 2007-12-07

Re: [RFC/PATCH 8/10] powerpc: Merge PCI resource fixups

From: Stephen Rothwell <hidden>
Date: 2007-12-06 11:51:30

On Thu, 06 Dec 2007 19:11:36 +1100 Benjamin Herrenschmidt [off-list ref] wrote:
quoted hunk ↗ jump to hunk
@@ -316,19 +313,26 @@ void __devinit of_scan_bus(struct device
 		dev = of_create_pci_dev(child, bus, devfn);
 		if (!dev)
 			continue;
-		DBG("dev header type: %x\n", dev->hdr_type);
+		DBG("    dev header type: %x\n", dev->hdr_type);
+	}
+
+	/* Ally all fixups */
+	pcibios_fixup_of_probed_bus(bus);
 
+	/* Now scan child busses */
+	list_for_each_entry(dev, &bus->devices, bus_list) {
 		if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE ||
-		    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS)
-			of_scan_pci_bridge(child, dev);
+		    dev->hdr_type == PCI_HEADER_TYPE_CARDBUS) {
+			struct device_node *child = pci_device_to_OF_node(dev);
+			if (dev)
                            ^^^
child?
+				of_scan_pci_bridge(child, dev);
+		}
 	}
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help