diff options
Diffstat (limited to 'arch/xtensa/kernel')
| -rw-r--r-- | arch/xtensa/kernel/pci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index 5b3403388d7f..b848cc3dc913 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
| @@ -174,7 +174,7 @@ static int __init pcibios_init(void) | |||
| 174 | struct pci_controller *pci_ctrl; | 174 | struct pci_controller *pci_ctrl; |
| 175 | struct list_head resources; | 175 | struct list_head resources; |
| 176 | struct pci_bus *bus; | 176 | struct pci_bus *bus; |
| 177 | int next_busno = 0; | 177 | int next_busno = 0, ret; |
| 178 | 178 | ||
| 179 | printk("PCI: Probing PCI hardware\n"); | 179 | printk("PCI: Probing PCI hardware\n"); |
| 180 | 180 | ||
| @@ -185,14 +185,25 @@ static int __init pcibios_init(void) | |||
| 185 | pci_controller_apertures(pci_ctrl, &resources); | 185 | pci_controller_apertures(pci_ctrl, &resources); |
| 186 | bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno, | 186 | bus = pci_scan_root_bus(NULL, pci_ctrl->first_busno, |
| 187 | pci_ctrl->ops, pci_ctrl, &resources); | 187 | pci_ctrl->ops, pci_ctrl, &resources); |
| 188 | if (!bus) | ||
| 189 | continue; | ||
| 190 | |||
| 188 | pci_ctrl->bus = bus; | 191 | pci_ctrl->bus = bus; |
| 189 | pci_ctrl->last_busno = bus->busn_res.end; | 192 | pci_ctrl->last_busno = bus->busn_res.end; |
| 190 | if (next_busno <= pci_ctrl->last_busno) | 193 | if (next_busno <= pci_ctrl->last_busno) |
| 191 | next_busno = pci_ctrl->last_busno+1; | 194 | next_busno = pci_ctrl->last_busno+1; |
| 192 | } | 195 | } |
| 193 | pci_bus_count = next_busno; | 196 | pci_bus_count = next_busno; |
| 197 | ret = platform_pcibios_fixup(); | ||
| 198 | if (ret) | ||
| 199 | return ret; | ||
| 194 | 200 | ||
| 195 | return platform_pcibios_fixup(); | 201 | for (pci_ctrl = pci_ctrl_head; pci_ctrl; pci_ctrl = pci_ctrl->next) { |
| 202 | if (pci_ctrl->bus) | ||
| 203 | pci_bus_add_devices(pci_ctrl->bus); | ||
| 204 | } | ||
| 205 | |||
| 206 | return 0; | ||
| 196 | } | 207 | } |
| 197 | 208 | ||
| 198 | subsys_initcall(pcibios_init); | 209 | subsys_initcall(pcibios_init); |
