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 bf2306bfa756..cf40f2c2c08c 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -1632,6 +1632,11 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1632 | /* Wire up PHB bus resources */ | 1632 | /* Wire up PHB bus resources */ |
1633 | pcibios_setup_phb_resources(hose, &resources); | 1633 | pcibios_setup_phb_resources(hose, &resources); |
1634 | 1634 | ||
1635 | hose->busn.start = hose->first_busno; | ||
1636 | hose->busn.end = hose->last_busno; | ||
1637 | hose->busn.flags = IORESOURCE_BUS; | ||
1638 | pci_add_resource(&resources, &hose->busn); | ||
1639 | |||
1635 | /* Create an empty bus for the toplevel */ | 1640 | /* Create an empty bus for the toplevel */ |
1636 | bus = pci_create_root_bus(hose->parent, hose->first_busno, | 1641 | bus = pci_create_root_bus(hose->parent, hose->first_busno, |
1637 | hose->ops, hose, &resources); | 1642 | hose->ops, hose, &resources); |
@@ -1641,7 +1646,6 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1641 | pci_free_resource_list(&resources); | 1646 | pci_free_resource_list(&resources); |
1642 | return; | 1647 | return; |
1643 | } | 1648 | } |
1644 | bus->secondary = hose->first_busno; | ||
1645 | hose->bus = bus; | 1649 | hose->bus = bus; |
1646 | 1650 | ||
1647 | /* Get probe mode and perform scan */ | 1651 | /* Get probe mode and perform scan */ |
@@ -1649,13 +1653,14 @@ void __devinit pcibios_scan_phb(struct pci_controller *hose) | |||
1649 | if (node && ppc_md.pci_probe_mode) | 1653 | if (node && ppc_md.pci_probe_mode) |
1650 | mode = ppc_md.pci_probe_mode(bus); | 1654 | mode = ppc_md.pci_probe_mode(bus); |
1651 | pr_debug(" probe mode: %d\n", mode); | 1655 | pr_debug(" probe mode: %d\n", mode); |
1652 | if (mode == PCI_PROBE_DEVTREE) { | 1656 | if (mode == PCI_PROBE_DEVTREE) |
1653 | bus->subordinate = hose->last_busno; | ||
1654 | of_scan_bus(node, bus); | 1657 | of_scan_bus(node, bus); |
1655 | } | ||
1656 | 1658 | ||
1657 | if (mode == PCI_PROBE_NORMAL) | 1659 | if (mode == PCI_PROBE_NORMAL) { |
1658 | hose->last_busno = bus->subordinate = pci_scan_child_bus(bus); | 1660 | pci_bus_update_busn_res_end(bus, 255); |
1661 | hose->last_busno = pci_scan_child_bus(bus); | ||
1662 | pci_bus_update_busn_res_end(bus, hose->last_busno); | ||
1663 | } | ||
1659 | 1664 | ||
1660 | /* Platform gets a chance to do some global fixups before | 1665 | /* Platform gets a chance to do some global fixups before |
1661 | * we proceed to resource allocation | 1666 | * we proceed to resource allocation |