diff options
author | Trent Piepho <tpiepho@freescale.com> | 2008-12-17 14:43:26 -0500 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2009-01-07 16:33:05 -0500 |
commit | 565f37642c78754a85efe6c20a4a15e18ed21f07 (patch) | |
tree | 59d91974af64223e2891cddfe9ce2e58ada8109d /arch/powerpc | |
parent | a097a78c1e6e4030fcef3bcab6351b6001662335 (diff) |
powerpc/fsl-pci: Set relaxed ordering on prefetchable ranges
Provides a small speedup when accessing pefetchable ranges. To indicate
that a memory range is prefetchable, mark it in the dts file with 42000000
instead of 02000000.
A powepc pci_controller is allowed three memory ranges, any of which may be
prefetchable. However, the PCI-PCI bridge configuration space only has one
field for "non-prefetchable memory behind bridge", which has a 32 bit
address, and one field for "prefetchable memory behind bridge", which may
have a 64 bit address. These are PCI bus addresses, not CPU physical
addresses.
So really you're only allowed one memory range of each type. And if you
want the range at a PCI address above 32 bits you must make it
prefetchable.
Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/sysdev/fsl_pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 44bc903ead74..9817f63723dd 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -41,6 +41,9 @@ static int __init setup_one_atmu(struct ccsr_pci __iomem *pci, | |||
41 | pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n", | 41 | pr_debug("PCI MEM resource start 0x%016llx, size 0x%016llx.\n", |
42 | (u64)res->start, (u64)size); | 42 | (u64)res->start, (u64)size); |
43 | 43 | ||
44 | if (res->flags & IORESOURCE_PREFETCH) | ||
45 | flags |= 0x10000000; /* enable relaxed ordering */ | ||
46 | |||
44 | for (i = 0; size > 0; i++) { | 47 | for (i = 0; size > 0; i++) { |
45 | unsigned int bits = min(__ilog2(size), | 48 | unsigned int bits = min(__ilog2(size), |
46 | __ffs(pci_addr | phys_addr)); | 49 | __ffs(pci_addr | phys_addr)); |