diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/pci/pci.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 0586535872cf..fa8e378413b1 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -81,6 +81,7 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose) | |||
81 | { | 81 | { |
82 | static int next_busno; | 82 | static int next_busno; |
83 | static int need_domain_info; | 83 | static int need_domain_info; |
84 | LIST_HEAD(resources); | ||
84 | struct pci_bus *bus; | 85 | struct pci_bus *bus; |
85 | 86 | ||
86 | if (!hose->iommu) | 87 | if (!hose->iommu) |
@@ -89,7 +90,13 @@ static void __devinit pcibios_scanbus(struct pci_controller *hose) | |||
89 | if (hose->get_busno && pci_probe_only) | 90 | if (hose->get_busno && pci_probe_only) |
90 | next_busno = (*hose->get_busno)(); | 91 | next_busno = (*hose->get_busno)(); |
91 | 92 | ||
92 | bus = pci_scan_bus(next_busno, hose->pci_ops, hose); | 93 | pci_add_resource(&resources, hose->mem_resource); |
94 | pci_add_resource(&resources, hose->io_resource); | ||
95 | bus = pci_scan_root_bus(NULL, next_busno, hose->pci_ops, hose, | ||
96 | &resources); | ||
97 | if (!bus) | ||
98 | pci_free_resource_list(&resources); | ||
99 | |||
93 | hose->bus = bus; | 100 | hose->bus = bus; |
94 | 101 | ||
95 | need_domain_info = need_domain_info || hose->index; | 102 | need_domain_info = need_domain_info || hose->index; |
@@ -245,15 +252,11 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
245 | { | 252 | { |
246 | /* Propagate hose info into the subordinate devices. */ | 253 | /* Propagate hose info into the subordinate devices. */ |
247 | 254 | ||
248 | struct pci_controller *hose = bus->sysdata; | ||
249 | struct list_head *ln; | 255 | struct list_head *ln; |
250 | struct pci_dev *dev = bus->self; | 256 | struct pci_dev *dev = bus->self; |
251 | 257 | ||
252 | if (!dev) { | 258 | if (pci_probe_only && dev && |
253 | bus->resource[0] = hose->io_resource; | 259 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { |
254 | bus->resource[1] = hose->mem_resource; | ||
255 | } else if (pci_probe_only && | ||
256 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | ||
257 | pci_read_bridge_bases(bus); | 260 | pci_read_bridge_bases(bus); |
258 | pcibios_fixup_device_resources(dev, bus); | 261 | pcibios_fixup_device_resources(dev, bus); |
259 | } | 262 | } |