diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-11 10:39:00 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-05-12 03:36:53 -0400 |
commit | be20902ba67de70b38c995903321f4152dee57b7 (patch) | |
tree | 86f27d4d90b7408d421ce246527431e58a836bf3 /arch/arm/mach-davinci/include | |
parent | 2fb3ec5c9503ba8874e24170de2b40e8f1a58370 (diff) |
ARM: use ARM_DMA_ZONE_SIZE to adjust the zone sizes
Rather than each platform providing its own function to adjust the
zone sizes, use the new ARM_DMA_ZONE_SIZE definition to perform this
adjustment. This ensures that the actual DMA zone size and the
ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS definitions are consistent with
each other, and moves this complexity out of the platform code.
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-davinci/include')
-rw-r--r-- | arch/arm/mach-davinci/include/mach/memory.h | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h index 8d27246cca4d..491249ef209c 100644 --- a/arch/arm/mach-davinci/include/mach/memory.h +++ b/arch/arm/mach-davinci/include/mach/memory.h | |||
@@ -41,26 +41,11 @@ | |||
41 | */ | 41 | */ |
42 | #define CONSISTENT_DMA_SIZE (14<<20) | 42 | #define CONSISTENT_DMA_SIZE (14<<20) |
43 | 43 | ||
44 | #ifndef __ASSEMBLY__ | ||
45 | /* | 44 | /* |
46 | * Restrict DMA-able region to workaround silicon bug. The bug | 45 | * Restrict DMA-able region to workaround silicon bug. The bug |
47 | * restricts buffers available for DMA to video hardware to be | 46 | * restricts buffers available for DMA to video hardware to be |
48 | * below 128M | 47 | * below 128M |
49 | */ | 48 | */ |
50 | static inline void | ||
51 | __arch_adjust_zones(unsigned long *size, unsigned long *holes) | ||
52 | { | ||
53 | unsigned int sz = (128<<20) >> PAGE_SHIFT; | ||
54 | |||
55 | size[1] = size[0] - sz; | ||
56 | size[0] = sz; | ||
57 | } | ||
58 | |||
59 | #define arch_adjust_zones(zone_size, holes) \ | ||
60 | if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes) | ||
61 | |||
62 | #define ARM_DMA_ZONE_SIZE SZ_128M | 49 | #define ARM_DMA_ZONE_SIZE SZ_128M |
63 | 50 | ||
64 | #endif | ||
65 | |||
66 | #endif /* __ASM_ARCH_MEMORY_H */ | 51 | #endif /* __ASM_ARCH_MEMORY_H */ |