diff options
Diffstat (limited to 'arch/powerpc/platforms/maple')
-rw-r--r-- | arch/powerpc/platforms/maple/pci.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 7aaa5bbc9363..fceaae40fe70 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -444,7 +444,7 @@ static void __init setup_u3_ht(struct pci_controller* hose) | |||
444 | u3_ht = hose; | 444 | u3_ht = hose; |
445 | } | 445 | } |
446 | 446 | ||
447 | static int __init add_bridge(struct device_node *dev) | 447 | static int __init maple_add_bridge(struct device_node *dev) |
448 | { | 448 | { |
449 | int len; | 449 | int len; |
450 | struct pci_controller *hose; | 450 | struct pci_controller *hose; |
@@ -519,23 +519,6 @@ void __devinit maple_pci_irq_fixup(struct pci_dev *dev) | |||
519 | DBG(" <- maple_pci_irq_fixup\n"); | 519 | DBG(" <- maple_pci_irq_fixup\n"); |
520 | } | 520 | } |
521 | 521 | ||
522 | static void __init maple_fixup_phb_resources(void) | ||
523 | { | ||
524 | struct pci_controller *hose, *tmp; | ||
525 | |||
526 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | ||
527 | unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; | ||
528 | |||
529 | hose->io_resource.start += offset; | ||
530 | hose->io_resource.end += offset; | ||
531 | |||
532 | printk(KERN_INFO "PCI Host %d, io start: %llx; io end: %llx\n", | ||
533 | hose->global_number, | ||
534 | (unsigned long long)hose->io_resource.start, | ||
535 | (unsigned long long)hose->io_resource.end); | ||
536 | } | ||
537 | } | ||
538 | |||
539 | void __init maple_pci_init(void) | 522 | void __init maple_pci_init(void) |
540 | { | 523 | { |
541 | struct device_node *np, *root; | 524 | struct device_node *np, *root; |
@@ -558,7 +541,7 @@ void __init maple_pci_init(void) | |||
558 | continue; | 541 | continue; |
559 | if ((of_device_is_compatible(np, "u4-pcie") || | 542 | if ((of_device_is_compatible(np, "u4-pcie") || |
560 | of_device_is_compatible(np, "u3-agp")) && | 543 | of_device_is_compatible(np, "u3-agp")) && |
561 | add_bridge(np) == 0) | 544 | maple_add_bridge(np) == 0) |
562 | of_node_get(np); | 545 | of_node_get(np); |
563 | 546 | ||
564 | if (of_device_is_compatible(np, "u3-ht")) { | 547 | if (of_device_is_compatible(np, "u3-ht")) { |
@@ -570,27 +553,9 @@ void __init maple_pci_init(void) | |||
570 | 553 | ||
571 | /* Now setup the HyperTransport host if we found any | 554 | /* Now setup the HyperTransport host if we found any |
572 | */ | 555 | */ |
573 | if (ht && add_bridge(ht) != 0) | 556 | if (ht && maple_add_bridge(ht) != 0) |
574 | of_node_put(ht); | 557 | of_node_put(ht); |
575 | 558 | ||
576 | /* | ||
577 | * We need to call pci_setup_phb_io for the HT bridge first | ||
578 | * so it gets the I/O port numbers starting at 0, and we | ||
579 | * need to call it for the AGP bridge after that so it gets | ||
580 | * small positive I/O port numbers. | ||
581 | */ | ||
582 | if (u3_ht) | ||
583 | pci_setup_phb_io(u3_ht, 1); | ||
584 | if (u3_agp) | ||
585 | pci_setup_phb_io(u3_agp, 0); | ||
586 | if (u4_pcie) | ||
587 | pci_setup_phb_io(u4_pcie, 0); | ||
588 | |||
589 | /* Fixup the IO resources on our host bridges as the common code | ||
590 | * does it only for childs of the host bridges | ||
591 | */ | ||
592 | maple_fixup_phb_resources(); | ||
593 | |||
594 | /* Setup the linkage between OF nodes and PHBs */ | 559 | /* Setup the linkage between OF nodes and PHBs */ |
595 | pci_devs_phb_init(); | 560 | pci_devs_phb_init(); |
596 | 561 | ||