diff options
Diffstat (limited to 'arch/alpha/kernel/pci.c')
-rw-r--r-- | arch/alpha/kernel/pci.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c index 8322df174bbf..564114eb85e1 100644 --- a/arch/alpha/kernel/pci.c +++ b/arch/alpha/kernel/pci.c | |||
@@ -312,8 +312,9 @@ common_init_pci(void) | |||
312 | { | 312 | { |
313 | struct pci_controller *hose; | 313 | struct pci_controller *hose; |
314 | struct list_head resources; | 314 | struct list_head resources; |
315 | struct pci_host_bridge *bridge; | ||
315 | struct pci_bus *bus; | 316 | struct pci_bus *bus; |
316 | int next_busno; | 317 | int ret, next_busno; |
317 | int need_domain_info = 0; | 318 | int need_domain_info = 0; |
318 | u32 pci_mem_end; | 319 | u32 pci_mem_end; |
319 | u32 sg_base; | 320 | u32 sg_base; |
@@ -336,11 +337,25 @@ common_init_pci(void) | |||
336 | pci_add_resource_offset(&resources, hose->mem_space, | 337 | pci_add_resource_offset(&resources, hose->mem_space, |
337 | hose->mem_space->start); | 338 | hose->mem_space->start); |
338 | 339 | ||
339 | bus = pci_scan_root_bus(NULL, next_busno, alpha_mv.pci_ops, | 340 | bridge = pci_alloc_host_bridge(0); |
340 | hose, &resources); | 341 | if (!bridge) |
341 | if (!bus) | ||
342 | continue; | 342 | continue; |
343 | hose->bus = bus; | 343 | |
344 | list_splice_init(&resources, &bridge->windows); | ||
345 | bridge->dev.parent = NULL; | ||
346 | bridge->sysdata = hose; | ||
347 | bridge->busnr = next_busno; | ||
348 | bridge->ops = alpha_mv.pci_ops; | ||
349 | bridge->swizzle_irq = alpha_mv.pci_swizzle; | ||
350 | bridge->map_irq = alpha_mv.pci_map_irq; | ||
351 | |||
352 | ret = pci_scan_root_bus_bridge(bridge); | ||
353 | if (ret) { | ||
354 | pci_free_host_bridge(bridge); | ||
355 | continue; | ||
356 | } | ||
357 | |||
358 | bus = hose->bus = bridge->bus; | ||
344 | hose->need_domain_info = need_domain_info; | 359 | hose->need_domain_info = need_domain_info; |
345 | next_busno = bus->busn_res.end + 1; | 360 | next_busno = bus->busn_res.end + 1; |
346 | /* Don't allow 8-bit bus number overflow inside the hose - | 361 | /* Don't allow 8-bit bus number overflow inside the hose - |
@@ -354,7 +369,6 @@ common_init_pci(void) | |||
354 | pcibios_claim_console_setup(); | 369 | pcibios_claim_console_setup(); |
355 | 370 | ||
356 | pci_assign_unassigned_resources(); | 371 | pci_assign_unassigned_resources(); |
357 | pci_fixup_irqs(alpha_mv.pci_swizzle, alpha_mv.pci_map_irq); | ||
358 | for (hose = hose_head; hose; hose = hose->next) { | 372 | for (hose = hose_head; hose; hose = hose->next) { |
359 | bus = hose->bus; | 373 | bus = hose->bus; |
360 | if (bus) | 374 | if (bus) |
@@ -362,7 +376,6 @@ common_init_pci(void) | |||
362 | } | 376 | } |
363 | } | 377 | } |
364 | 378 | ||
365 | |||
366 | struct pci_controller * __init | 379 | struct pci_controller * __init |
367 | alloc_pci_controller(void) | 380 | alloc_pci_controller(void) |
368 | { | 381 | { |