diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 1 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci-common.c | 17 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_of_scan.c | 2 |
3 files changed, 13 insertions, 7 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index ac39e6a3b25a..8cccbee61519 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -30,6 +30,7 @@ struct pci_controller { | |||
30 | int first_busno; | 30 | int first_busno; |
31 | int last_busno; | 31 | int last_busno; |
32 | int self_busno; | 32 | int self_busno; |
33 | struct resource busn; | ||
33 | 34 | ||
34 | void __iomem *io_base_virt; | 35 | void __iomem *io_base_virt; |
35 | #ifdef CONFIG_PPC64 | 36 | #ifdef CONFIG_PPC64 |
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 |
diff --git a/arch/powerpc/kernel/pci_of_scan.c b/arch/powerpc/kernel/pci_of_scan.c index a36281aa98f3..ae5ea5e04d65 100644 --- a/arch/powerpc/kernel/pci_of_scan.c +++ b/arch/powerpc/kernel/pci_of_scan.c | |||
@@ -240,7 +240,7 @@ void __devinit of_scan_pci_bridge(struct pci_dev *dev) | |||
240 | } | 240 | } |
241 | 241 | ||
242 | bus->primary = dev->bus->number; | 242 | bus->primary = dev->bus->number; |
243 | bus->busn_res.end = busrange[1]; | 243 | pci_bus_insert_busn_res(bus, busrange[0], busrange[1]); |
244 | bus->bridge_ctl = 0; | 244 | bus->bridge_ctl = 0; |
245 | 245 | ||
246 | /* parse ranges property */ | 246 | /* parse ranges property */ |