diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2011-10-28 18:26:52 -0400 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-01-06 15:11:01 -0500 |
commit | 4723b984b227f3fd466cd56cd18bc0110fff5987 (patch) | |
tree | 1de829a24d03a82221916d2b094a8ccc9be88b32 /arch/microblaze | |
parent | 58de74b805312c7f5757cb654e9829bd9c1f3c69 (diff) |
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>
Diffstat (limited to 'arch/microblaze')
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index e0fdab323ec5..016d420f0ec7 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -1590,9 +1590,8 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1590 | 1590 | ||
1591 | pcibios_setup_phb_resources(hose, &resources); | 1591 | pcibios_setup_phb_resources(hose, &resources); |
1592 | 1592 | ||
1593 | /* Create an empty bus for the toplevel */ | 1593 | bus = pci_scan_root_bus(hose->parent, hose->first_busno, |
1594 | bus = pci_create_root_bus(hose->parent, hose->first_busno, hose->ops, | 1594 | hose->ops, hose, &resources); |
1595 | hose, &resources); | ||
1596 | if (bus == NULL) { | 1595 | if (bus == NULL) { |
1597 | printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", | 1596 | printk(KERN_ERR "Failed to create bus for PCI domain %04x\n", |
1598 | hose->global_number); | 1597 | hose->global_number); |
@@ -1602,8 +1601,7 @@ static void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1602 | bus->secondary = hose->first_busno; | 1601 | bus->secondary = hose->first_busno; |
1603 | hose->bus = bus; | 1602 | hose->bus = bus; |
1604 | 1603 | ||
1605 | /* Scan children */ | 1604 | hose->last_busno = bus->subordinate; |
1606 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | ||
1607 | } | 1605 | } |
1608 | 1606 | ||
1609 | static int __init pcibios_init(void) | 1607 | static int __init pcibios_init(void) |
@@ -1617,8 +1615,6 @@ static int __init pcibios_init(void) | |||
1617 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | 1615 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { |
1618 | hose->last_busno = 0xff; | 1616 | hose->last_busno = 0xff; |
1619 | pcibios_scan_phb(hose); | 1617 | pcibios_scan_phb(hose); |
1620 | printk(KERN_INFO "calling pci_bus_add_devices()\n"); | ||
1621 | pci_bus_add_devices(hose->bus); | ||
1622 | if (next_busno <= hose->last_busno) | 1618 | if (next_busno <= hose->last_busno) |
1623 | next_busno = hose->last_busno + 1; | 1619 | next_busno = hose->last_busno + 1; |
1624 | } | 1620 | } |