diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2007-12-19 22:54:55 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-20 00:18:10 -0500 |
commit | 50c9bc2fc86fddd39eea6a12ceb81585bc2aafaa (patch) | |
tree | a6021e68bdc0477ada4bc81d04443e3316cdbb4f /arch/powerpc/kernel/pci_64.c | |
parent | 3fd94c6b1a1158d3e0e505b0a00c3a707b5fcd40 (diff) |
[POWERPC] fix iSeries PCI resource management
The way iSeries manages PCI IO and Memory resources is a bit strange
and is based on overriding the content of those resources with home
cooked ones afterward.
This changes it a bit to better integrate with the new resource handling
so that the "virtual" tokens that iSeries replaces resources with are
done from the proper per-device fixup hook, and bridge resources are
set to enclose that token space. This fixes various things such as
the output of /proc/iomem & ioports, among others. This also fixes up
various boot messages as well.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_64.c')
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 794359d8686b..2ec040b314d4 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -359,7 +359,7 @@ void __devinit scan_phb(struct pci_controller *hose) | |||
359 | int i, mode; | 359 | int i, mode; |
360 | struct resource *res; | 360 | struct resource *res; |
361 | 361 | ||
362 | DBG("Scanning PHB %s\n", node ? node->full_name : "<NO NAME>"); | 362 | DBG("PCI: Scanning PHB %s\n", node ? node->full_name : "<NO NAME>"); |
363 | 363 | ||
364 | /* Create an empty bus for the toplevel */ | 364 | /* Create an empty bus for the toplevel */ |
365 | bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); | 365 | bus = pci_create_bus(hose->parent, hose->first_busno, hose->ops, node); |
@@ -375,9 +375,22 @@ void __devinit scan_phb(struct pci_controller *hose) | |||
375 | pcibios_map_io_space(bus); | 375 | pcibios_map_io_space(bus); |
376 | 376 | ||
377 | /* Wire up PHB bus resources */ | 377 | /* Wire up PHB bus resources */ |
378 | bus->resource[0] = res = &hose->io_resource; | 378 | if (hose->io_resource.flags) { |
379 | for (i = 0; i < 3; ++i) | 379 | DBG("PCI: PHB IO resource = %016lx-%016lx [%lx]\n", |
380 | hose->io_resource.start, hose->io_resource.end, | ||
381 | hose->io_resource.flags); | ||
382 | bus->resource[0] = res = &hose->io_resource; | ||
383 | } | ||
384 | for (i = 0; i < 3; ++i) { | ||
385 | DBG("PCI: PHB MEM resource %d = %016lx-%016lx [%lx]\n", i, | ||
386 | hose->mem_resources[i].start, | ||
387 | hose->mem_resources[i].end, | ||
388 | hose->mem_resources[i].flags); | ||
380 | bus->resource[i+1] = &hose->mem_resources[i]; | 389 | bus->resource[i+1] = &hose->mem_resources[i]; |
390 | } | ||
391 | DBG("PCI: PHB MEM offset = %016lx\n", hose->pci_mem_offset); | ||
392 | DBG("PCI: PHB IO offset = %08lx\n", | ||
393 | (unsigned long)hose->io_base_virt - _IO_BASE); | ||
381 | 394 | ||
382 | /* Get probe mode and perform scan */ | 395 | /* Get probe mode and perform scan */ |
383 | mode = PCI_PROBE_NORMAL; | 396 | mode = PCI_PROBE_NORMAL; |