diff options
author | Kumar Gala <galak@gate.crashing.org> | 2005-12-13 14:46:29 -0600 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-09 14:54:06 +1100 |
commit | cd0c7f06803be06a5cf4564aa5a900f4b6aea603 (patch) | |
tree | 23c89e6dde3b316aea54890e7c605ec8a5574716 | |
parent | 31087d7d49bf5fc9cbc2c4852a079213755e8733 (diff) | |
download | blackbird-op-linux-cd0c7f06803be06a5cf4564aa5a900f4b6aea603.tar.gz blackbird-op-linux-cd0c7f06803be06a5cf4564aa5a900f4b6aea603.zip |
[PATCH] powerpc: Detect prefetchable windows in pci_process_bridge_OF_ranges
Added the ability to determine if an outbound window in the PCI host
controller is for prefetchable memory and report it as such.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | arch/ppc/kernel/pci.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index af364003880b..8de320308e87 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c @@ -941,7 +941,7 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose, while (ranges && (rlen -= np * sizeof(unsigned int)) >= 0) { res = NULL; size = ranges[na+4]; - switch (ranges[0] >> 24) { + switch ((ranges[0] >> 24) & 0x3) { case 1: /* I/O space */ if (ranges[2] != 0) break; @@ -955,6 +955,8 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose, res = &hose->io_resource; res->flags = IORESOURCE_IO; res->start = ranges[2]; + DBG("PCI: IO 0x%lx -> 0x%lx\n", + res->start, res->start + size - 1); break; case 2: /* memory space */ memno = 0; @@ -972,7 +974,11 @@ pci_process_bridge_OF_ranges(struct pci_controller *hose, if (memno < 3) { res = &hose->mem_resources[memno]; res->flags = IORESOURCE_MEM; + if(ranges[0] & 0x40000000) + res->flags |= IORESOURCE_PREFETCH; res->start = ranges[na+2]; + DBG("PCI: MEM[%d] 0x%lx -> 0x%lx\n", memno, + res->start, res->start + size - 1); } break; } |