microblaze/PCI: use pci_scan_root_bus()
Microblaze doesn't need to replace pci_scan_child_bus() or do anything special before pci_bus_add_devices(), so we can use the more generic PCI path in pci_scan_root_bus(). CC: Michal Simek <monstr@monstr.eu> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
This commit is contained in:
parent
58de74b805
commit
4723b984b2
@ -1590,9 +1590,8 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose)
|
|||||||
|
|
||||||
pcibios_setup_phb_resources(hose, &resources);
|
pcibios_setup_phb_resources(hose, &resources);
|
||||||
|
|
||||||
/* Create an empty bus for the toplevel */
|
bus = pci_scan_root_bus(hose->parent, hose->first_busno,
|
||||||
bus = pci_create_root_bus(hose->parent, hose->first_busno, hose->ops,
|
hose->ops, hose, &resources);
|
||||||
hose, &resources);
|
|
||||||
if (bus == NULL) {
|
if (bus == NULL) {
|
||||||
printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
|
printk(KERN_ERR "Failed to create bus for PCI domain %04x\n",
|
||||||
hose->global_number);
|
hose->global_number);
|
||||||
@ -1602,8 +1601,7 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose)
|
|||||||
bus->secondary = hose->first_busno;
|
bus->secondary = hose->first_busno;
|
||||||
hose->bus = bus;
|
hose->bus = bus;
|
||||||
|
|
||||||
/* Scan children */
|
hose->last_busno = bus->subordinate;
|
||||||
hose->last_busno = bus->subordinate = pci_scan_child_bus(bus);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int __init pcibios_init(void)
|
static int __init pcibios_init(void)
|
||||||
@ -1617,8 +1615,6 @@ static int __init pcibios_init(void)
|
|||||||
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
|
list_for_each_entry_safe(hose, tmp, &hose_list, list_node) {
|
||||||
hose->last_busno = 0xff;
|
hose->last_busno = 0xff;
|
||||||
pcibios_scan_phb(hose);
|
pcibios_scan_phb(hose);
|
||||||
printk(KERN_INFO "calling pci_bus_add_devices()\n");
|
|
||||||
pci_bus_add_devices(hose->bus);
|
|
||||||
if (next_busno <= hose->last_busno)
|
if (next_busno <= hose->last_busno)
|
||||||
next_busno = hose->last_busno + 1;
|
next_busno = hose->last_busno + 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user