diff options
author | John Rose <johnrose@austin.ibm.com> | 2006-03-14 18:46:45 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-16 00:55:07 -0500 |
commit | 92eb4602eb5c37db86cd9d2b1f4c8ca304fbc49f (patch) | |
tree | d6f53b85f0071e914cd1fa5d363259d584f1d3b2 /arch/powerpc/platforms | |
parent | 920573bd03bf690135967b5022362d34ede589c3 (diff) |
[PATCH] powerpc: properly configure DDR/P5IOC children devs
The dynamic add path for PCI Host Bridges can fail to configure children
adapters under P5IOC controllers. It fails to properly fixup bus/device
resources, and it fails to properly enable EEH. Both of these steps
need to occur before any children devices are enabled in
pci_bus_add_devices().
Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/pseries/pci_dlpar.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/pci_dlpar.c b/arch/powerpc/platforms/pseries/pci_dlpar.c index f3bad900bbcf..44abdeb9ca03 100644 --- a/arch/powerpc/platforms/pseries/pci_dlpar.c +++ b/arch/powerpc/platforms/pseries/pci_dlpar.c | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | #include <linux/pci.h> | 28 | #include <linux/pci.h> |
29 | #include <asm/pci-bridge.h> | 29 | #include <asm/pci-bridge.h> |
30 | #include <asm/ppc-pci.h> | ||
30 | 31 | ||
31 | static struct pci_bus * | 32 | static struct pci_bus * |
32 | find_bus_among_children(struct pci_bus *bus, | 33 | find_bus_among_children(struct pci_bus *bus, |
@@ -179,3 +180,30 @@ pcibios_add_pci_devices(struct pci_bus * bus) | |||
179 | } | 180 | } |
180 | } | 181 | } |
181 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); | 182 | EXPORT_SYMBOL_GPL(pcibios_add_pci_devices); |
183 | |||
184 | struct pci_controller * __devinit init_phb_dynamic(struct device_node *dn) | ||
185 | { | ||
186 | struct pci_controller *phb; | ||
187 | int primary; | ||
188 | |||
189 | primary = list_empty(&hose_list); | ||
190 | phb = pcibios_alloc_controller(dn); | ||
191 | if (!phb) | ||
192 | return NULL; | ||
193 | setup_phb(dn, phb); | ||
194 | pci_process_bridge_OF_ranges(phb, dn, 0); | ||
195 | |||
196 | pci_setup_phb_io_dynamic(phb, primary); | ||
197 | |||
198 | pci_devs_phb_init_dynamic(phb); | ||
199 | |||
200 | if (dn->child) | ||
201 | eeh_add_device_tree_early(dn); | ||
202 | |||
203 | scan_phb(phb); | ||
204 | pcibios_fixup_new_pci_devices(phb->bus, 0); | ||
205 | pci_bus_add_devices(phb->bus); | ||
206 | |||
207 | return phb; | ||
208 | } | ||
209 | EXPORT_SYMBOL_GPL(init_phb_dynamic); | ||