diff options
Diffstat (limited to 'arch/powerpc/kernel/pci-common.c')
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 3532b535698a..7320f3685523 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1637,6 +1637,11 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1637 | /* Wire up PHB bus resources */ | 1637 | /* Wire up PHB bus resources */ |
1638 | pcibios_setup_phb_resources(hose, &resources); | 1638 | pcibios_setup_phb_resources(hose, &resources); |
1639 | 1639 | ||
1640 | hose->busn.start = hose->first_busno; | ||
1641 | hose->busn.end = hose->last_busno; | ||
1642 | hose->busn.flags = IORESOURCE_BUS; | ||
1643 | pci_add_resource(&resources, &hose->busn); | ||
1644 | |||
1640 | /* Create an empty bus for the toplevel */ | 1645 | /* Create an empty bus for the toplevel */ |
1641 | bus = pci_create_root_bus(hose->parent, hose->first_busno, | 1646 | bus = pci_create_root_bus(hose->parent, hose->first_busno, |
1642 | hose->ops, hose, &resources); | 1647 | hose->ops, hose, &resources); |
@@ -1646,7 +1651,6 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1646 | pci_free_resource_list(&resources); | 1651 | pci_free_resource_list(&resources); |
1647 | return; | 1652 | return; |
1648 | } | 1653 | } |
1649 | bus->busn_res.start = hose->first_busno; | ||
1650 | hose->bus = bus; | 1654 | hose->bus = bus; |
1651 | 1655 | ||
1652 | /* Get probe mode and perform scan */ | 1656 | /* Get probe mode and perform scan */ |
@@ -1654,13 +1658,14 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1654 | if (node && ppc_md.pci_probe_mode) | 1658 | if (node && ppc_md.pci_probe_mode) |
1655 | mode = ppc_md.pci_probe_mode(bus); | 1659 | mode = ppc_md.pci_probe_mode(bus); |
1656 | pr_debug(" probe mode: %d\n", mode); | 1660 | pr_debug(" probe mode: %d\n", mode); |
1657 | if (mode == PCI_PROBE_DEVTREE) { | 1661 | if (mode == PCI_PROBE_DEVTREE) |
1658 | bus->busn_res.end = hose->last_busno; | ||
1659 | of_scan_bus(node, bus); | 1662 | of_scan_bus(node, bus); |
1660 | } | ||
1661 | 1663 | ||
1662 | if (mode == PCI_PROBE_NORMAL) | 1664 | if (mode == PCI_PROBE_NORMAL) { |
1663 | hose->last_busno = bus->busn_res.end = pci_scan_child_bus(bus); | 1665 | pci_bus_update_busn_res_end(bus, 255); |
1666 | hose->last_busno = pci_scan_child_bus(bus); | ||
1667 | pci_bus_update_busn_res_end(bus, hose->last_busno); | ||
1668 | } | ||
1664 | 1669 | ||
1665 | /* Platform gets a chance to do some global fixups before | 1670 | /* Platform gets a chance to do some global fixups before |
1666 | * we proceed to resource allocation | 1671 | * we proceed to resource allocation |