aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-11-11 17:25:05 +1100
committerPaul Mackerras <paulus@samba.org>2006-12-04 20:38:43 +1100
commite557a1c96c82f4d1a91b5c2e2e0275b5999c297d (patch)
tree973b9234d0aa18453bd783b92d7fa96719f92e3a /arch/powerpc
parent868108784ccf0add6ac593bfbc2eb5a0804af48d (diff)
[POWERPC] Resolve the parent address of a PCI bus range
When parsing the OF "ranges" properties of PCI host busses to determine the mapping of a PCI bus, we need to translate the "parent" address using the prom_parse.c routines in order to obtain a CPU physical address. This wasn't necessary while PCI busses were always at the root of the device-tree but this is no longer the case on Cell where they can be anywhere in the tree. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/pci_64.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 88b78484b94..5ffab8787b9 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -967,11 +967,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose,
res = NULL;
pci_space = ranges[0];
pci_addr = ((unsigned long)ranges[1] << 32) | ranges[2];
-
- cpu_phys_addr = ranges[3];
- if (na >= 2)
- cpu_phys_addr = (cpu_phys_addr << 32) | ranges[4];
-
+ cpu_phys_addr = of_translate_address(dev, &ranges[3]);
size = ((unsigned long)ranges[na+3] << 32) | ranges[na+4];
ranges += np;
if (size == 0)