diff options
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/cell/io-workarounds.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/iseries/pci.c | 5 | ||||
-rw-r--r-- | arch/powerpc/platforms/maple/pci.c | 35 | ||||
-rw-r--r-- | arch/powerpc/platforms/pasemi/pci.c | 20 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pci.c | 32 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/pseries.h | 2 |
7 files changed, 8 insertions, 90 deletions
diff --git a/arch/powerpc/platforms/cell/io-workarounds.c b/arch/powerpc/platforms/cell/io-workarounds.c index 7fb92f23f38..9d7c2ef940a 100644 --- a/arch/powerpc/platforms/cell/io-workarounds.c +++ b/arch/powerpc/platforms/cell/io-workarounds.c | |||
@@ -102,7 +102,7 @@ static void spider_io_flush(const volatile void __iomem *addr) | |||
102 | vaddr = (unsigned long)PCI_FIX_ADDR(addr); | 102 | vaddr = (unsigned long)PCI_FIX_ADDR(addr); |
103 | 103 | ||
104 | /* Check if it's in allowed range for PIO */ | 104 | /* Check if it's in allowed range for PIO */ |
105 | if (vaddr < PHBS_IO_BASE || vaddr >= IMALLOC_BASE) | 105 | if (vaddr < PHB_IO_BASE || vaddr > PHB_IO_END) |
106 | return; | 106 | return; |
107 | 107 | ||
108 | /* Try to find a PTE. If not, clear the paddr, we'll do | 108 | /* Try to find a PTE. If not, clear the paddr, we'll do |
diff --git a/arch/powerpc/platforms/iseries/pci.c b/arch/powerpc/platforms/iseries/pci.c index 9c974227155..23d87621187 100644 --- a/arch/powerpc/platforms/iseries/pci.c +++ b/arch/powerpc/platforms/iseries/pci.c | |||
@@ -742,6 +742,11 @@ void __init iSeries_pcibios_init(void) | |||
742 | /* Install IO hooks */ | 742 | /* Install IO hooks */ |
743 | ppc_pci_io = iseries_pci_io; | 743 | ppc_pci_io = iseries_pci_io; |
744 | 744 | ||
745 | /* iSeries has no IO space in the common sense, it needs to set | ||
746 | * the IO base to 0 | ||
747 | */ | ||
748 | pci_io_base = 0; | ||
749 | |||
745 | if (root == NULL) { | 750 | if (root == NULL) { |
746 | printk(KERN_CRIT "iSeries_pcibios_init: can't find root " | 751 | printk(KERN_CRIT "iSeries_pcibios_init: can't find root " |
747 | "of device tree\n"); | 752 | "of device tree\n"); |
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c index 7aaa5bbc936..f357b925887 100644 --- a/arch/powerpc/platforms/maple/pci.c +++ b/arch/powerpc/platforms/maple/pci.c | |||
@@ -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; |
@@ -573,24 +556,6 @@ void __init maple_pci_init(void) | |||
573 | if (ht && add_bridge(ht) != 0) | 556 | if (ht && 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 | ||
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index bbc6dfcfaa9..5606f25760b 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -150,29 +150,11 @@ static int __init add_bridge(struct device_node *dev) | |||
150 | printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); | 150 | printk(KERN_INFO "Found PA-PXP PCI host bridge.\n"); |
151 | 151 | ||
152 | /* Interpret the "ranges" property */ | 152 | /* Interpret the "ranges" property */ |
153 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
154 | pci_process_bridge_OF_ranges(hose, dev, 1); | 153 | pci_process_bridge_OF_ranges(hose, dev, 1); |
155 | pci_setup_phb_io(hose, 1); | ||
156 | 154 | ||
157 | return 0; | 155 | return 0; |
158 | } | 156 | } |
159 | 157 | ||
160 | |||
161 | static void __init pas_fixup_phb_resources(void) | ||
162 | { | ||
163 | struct pci_controller *hose, *tmp; | ||
164 | |||
165 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | ||
166 | unsigned long offset = (unsigned long)hose->io_base_virt - pci_io_base; | ||
167 | hose->io_resource.start += offset; | ||
168 | hose->io_resource.end += offset; | ||
169 | printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", | ||
170 | hose->global_number, | ||
171 | hose->io_resource.start, hose->io_resource.end); | ||
172 | } | ||
173 | } | ||
174 | |||
175 | |||
176 | void __init pas_pci_init(void) | 158 | void __init pas_pci_init(void) |
177 | { | 159 | { |
178 | struct device_node *np, *root; | 160 | struct device_node *np, *root; |
@@ -190,8 +172,6 @@ void __init pas_pci_init(void) | |||
190 | 172 | ||
191 | of_node_put(root); | 173 | of_node_put(root); |
192 | 174 | ||
193 | pas_fixup_phb_resources(); | ||
194 | |||
195 | /* Setup the linkage between OF nodes and PHBs */ | 175 | /* Setup the linkage between OF nodes and PHBs */ |
196 | pci_devs_phb_init(); | 176 | pci_devs_phb_init(); |
197 | 177 | ||
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c index c4af9e21ac9..8302e34a3cb 100644 --- a/arch/powerpc/platforms/powermac/pci.c +++ b/arch/powerpc/platforms/powermac/pci.c | |||
@@ -1006,19 +1006,6 @@ void __devinit pmac_pci_irq_fixup(struct pci_dev *dev) | |||
1006 | #endif /* CONFIG_PPC32 */ | 1006 | #endif /* CONFIG_PPC32 */ |
1007 | } | 1007 | } |
1008 | 1008 | ||
1009 | #ifdef CONFIG_PPC64 | ||
1010 | static void __init pmac_fixup_phb_resources(void) | ||
1011 | { | ||
1012 | struct pci_controller *hose, *tmp; | ||
1013 | |||
1014 | list_for_each_entry_safe(hose, tmp, &hose_list, list_node) { | ||
1015 | printk(KERN_INFO "PCI Host %d, io start: %lx; io end: %lx\n", | ||
1016 | hose->global_number, | ||
1017 | hose->io_resource.start, hose->io_resource.end); | ||
1018 | } | ||
1019 | } | ||
1020 | #endif | ||
1021 | |||
1022 | void __init pmac_pci_init(void) | 1009 | void __init pmac_pci_init(void) |
1023 | { | 1010 | { |
1024 | struct device_node *np, *root; | 1011 | struct device_node *np, *root; |
@@ -1053,25 +1040,6 @@ void __init pmac_pci_init(void) | |||
1053 | if (ht && add_bridge(ht) != 0) | 1040 | if (ht && add_bridge(ht) != 0) |
1054 | of_node_put(ht); | 1041 | of_node_put(ht); |
1055 | 1042 | ||
1056 | /* | ||
1057 | * We need to call pci_setup_phb_io for the HT bridge first | ||
1058 | * so it gets the I/O port numbers starting at 0, and we | ||
1059 | * need to call it for the AGP bridge after that so it gets | ||
1060 | * small positive I/O port numbers. | ||
1061 | */ | ||
1062 | if (u3_ht) | ||
1063 | pci_setup_phb_io(u3_ht, 1); | ||
1064 | if (u3_agp) | ||
1065 | pci_setup_phb_io(u3_agp, 0); | ||
1066 | if (u4_pcie) | ||
1067 | pci_setup_phb_io(u4_pcie, 0); | ||
1068 | |||
1069 | /* | ||
1070 | * On ppc64, fixup the IO resources on our host bridges as | ||
1071 | * the common code does it only for children of the host bridges | ||
1072 | */ | ||
1073 | pmac_fixup_phb_resources(); | ||
1074 | |||
1075 | /* Setup the linkage between OF nodes and PHBs */ | 1043 | /* Setup the linkage between OF nodes and PHBs */ |
1076 | pci_devs_phb_init(); | 1044 | pci_devs_phb_init(); |
1077 | 1045 | ||
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index 0b113ab90ba..47f0e0857f0 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -202,8 +202,6 @@ struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | |||
202 | rtas_setup_phb(phb); | 202 | rtas_setup_phb(phb); |
203 | pci_process_bridge_OF_ranges(phb, dn, 0); | 203 | pci_process_bridge_OF_ranges(phb, dn, 0); |
204 | 204 | ||
205 | pci_setup_phb_io_dynamic(phb, primary); | ||
206 | |||
207 | pci_devs_phb_init_dynamic(phb); | 205 | pci_devs_phb_init_dynamic(phb); |
208 | 206 | ||
209 | if (dn->child) | 207 | if (dn->child) |
diff --git a/arch/powerpc/platforms/pseries/pseries.h b/arch/powerpc/platforms/pseries/pseries.h index 2729d559fd9..61e19f78b92 100644 --- a/arch/powerpc/platforms/pseries/pseries.h +++ b/arch/powerpc/platforms/pseries/pseries.h | |||
@@ -33,6 +33,8 @@ static inline void setup_kexec_cpu_down_xics(void) { } | |||
33 | static inline void setup_kexec_cpu_down_mpic(void) { } | 33 | static inline void setup_kexec_cpu_down_mpic(void) { } |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | extern void pSeries_final_fixup(void); | ||
37 | |||
36 | /* Poweron flag used for enabling auto ups restart */ | 38 | /* Poweron flag used for enabling auto ups restart */ |
37 | extern unsigned long rtas_poweron_auto; | 39 | extern unsigned long rtas_poweron_auto; |
38 | 40 | ||