aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-05-11 11:06:29 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-05-12 03:36:49 -0400
commit2fb3ec5c9503ba8874e24170de2b40e8f1a58370 (patch)
tree9a2b25d2c410bc51e1a1155e7dcaab17f9673716 /arch
parent78fca1b95837a44983608302e89c7258981be9b3 (diff)
ARM: Replace platform definition of ISA_DMA_THRESHOLD/MAX_DMA_ADDRESS
The values of ISA_DMA_THRESHOLD and MAX_DMA_ADDRESS are related; one is the physical/bus address, the other is the virtual address. Both need to be kept in step, so rather than having platforms define both, allow them to define a single macro which sets both of these macros appropraitely. 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')
-rw-r--r--arch/arm/include/asm/dma.h4
-rw-r--r--arch/arm/include/asm/memory.h4
-rw-r--r--arch/arm/mach-davinci/include/mach/memory.h3
-rw-r--r--arch/arm/mach-h720x/include/mach/memory.h3
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/memory.h3
-rw-r--r--arch/arm/mach-pxa/include/mach/memory.h3
-rw-r--r--arch/arm/mach-realview/include/mach/memory.h3
-rw-r--r--arch/arm/mach-sa1100/include/mach/memory.h3
-rw-r--r--arch/arm/mach-shark/include/mach/memory.h3
9 files changed, 13 insertions, 16 deletions
diff --git a/arch/arm/include/asm/dma.h b/arch/arm/include/asm/dma.h
index ca51143f97f1..42005542932b 100644
--- a/arch/arm/include/asm/dma.h
+++ b/arch/arm/include/asm/dma.h
@@ -6,8 +6,10 @@
6/* 6/*
7 * This is the maximum virtual address which can be DMA'd from. 7 * This is the maximum virtual address which can be DMA'd from.
8 */ 8 */
9#ifndef MAX_DMA_ADDRESS 9#ifndef ARM_DMA_ZONE_SIZE
10#define MAX_DMA_ADDRESS 0xffffffff 10#define MAX_DMA_ADDRESS 0xffffffff
11#else
12#define MAX_DMA_ADDRESS (PAGE_OFFSET + ARM_DMA_ZONE_SIZE)
11#endif 13#endif
12 14
13#ifdef CONFIG_ISA_DMA_API 15#ifdef CONFIG_ISA_DMA_API
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 431077c5a867..ee5ff41027a3 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -209,8 +209,10 @@ static inline unsigned long __phys_to_virt(unsigned long x)
209 * allocations. This must be the smallest DMA mask in the system, 209 * allocations. This must be the smallest DMA mask in the system,
210 * so a successful GFP_DMA allocation will always satisfy this. 210 * so a successful GFP_DMA allocation will always satisfy this.
211 */ 211 */
212#ifndef ISA_DMA_THRESHOLD 212#ifndef ARM_DMA_ZONE_SIZE
213#define ISA_DMA_THRESHOLD (0xffffffffULL) 213#define ISA_DMA_THRESHOLD (0xffffffffULL)
214#else
215#define ISA_DMA_THRESHOLD (PHYS_OFFSET + ARM_DMA_ZONE_SIZE - 1)
214#endif 216#endif
215 217
216#ifndef arch_adjust_zones 218#ifndef arch_adjust_zones
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index 78822723f382..8d27246cca4d 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -59,8 +59,7 @@ __arch_adjust_zones(unsigned long *size, unsigned long *holes)
59#define arch_adjust_zones(zone_size, holes) \ 59#define arch_adjust_zones(zone_size, holes) \
60 if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes) 60 if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes)
61 61
62#define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1) 62#define ARM_DMA_ZONE_SIZE SZ_128M
63#define MAX_DMA_ADDRESS (PAGE_OFFSET + (128<<20))
64 63
65#endif 64#endif
66 65
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
index 9d3687651462..b0b3baec9acf 100644
--- a/arch/arm/mach-h720x/include/mach/memory.h
+++ b/arch/arm/mach-h720x/include/mach/memory.h
@@ -13,7 +13,6 @@
13 * There should not be more than (0xd0000000 - 0xc0000000) 13 * There should not be more than (0xd0000000 - 0xc0000000)
14 * bytes of RAM. 14 * bytes of RAM.
15 */ 15 */
16#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) 16#define ARM_DMA_ZONE_SIZE SZ_256M
17#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
18 17
19#endif 18#endif
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
index 6d388c9d0e20..a5c26f8d3125 100644
--- a/arch/arm/mach-ixp4xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
@@ -21,8 +21,7 @@ void ixp4xx_adjust_zones(unsigned long *size, unsigned long *holes);
21#define arch_adjust_zones(size, holes) \ 21#define arch_adjust_zones(size, holes) \
22 ixp4xx_adjust_zones(size, holes) 22 ixp4xx_adjust_zones(size, holes)
23 23
24#define ISA_DMA_THRESHOLD (SZ_64M - 1) 24#define ARM_DMA_ZONE_SIZE SZ_64M
25#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
26 25
27#endif 26#endif
28 27
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
index 7f68724dcc27..57a0b689b4d0 100644
--- a/arch/arm/mach-pxa/include/mach/memory.h
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -23,8 +23,7 @@ void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
23#define arch_adjust_zones(size, holes) \ 23#define arch_adjust_zones(size, holes) \
24 cmx2xx_pci_adjust_zones(size, holes) 24 cmx2xx_pci_adjust_zones(size, holes)
25 25
26#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1) 26#define ARM_DMA_ZONE_SIZE SZ_64M
27#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
28#endif 27#endif
29 28
30#endif 29#endif
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
index e05fc2c4c080..973428d3f7cb 100644
--- a/arch/arm/mach-realview/include/mach/memory.h
+++ b/arch/arm/mach-realview/include/mach/memory.h
@@ -34,8 +34,7 @@ extern void realview_adjust_zones(unsigned long *size, unsigned long *hole);
34#define arch_adjust_zones(size, hole) \ 34#define arch_adjust_zones(size, hole) \
35 realview_adjust_zones(size, hole) 35 realview_adjust_zones(size, hole)
36 36
37#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) 37#define ARM_DMA_ZONE_SIZE SZ_256M
38#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
39#endif 38#endif
40 39
41#ifdef CONFIG_SPARSEMEM 40#ifdef CONFIG_SPARSEMEM
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index a44da6a2916c..090b82982abb 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -22,8 +22,7 @@ void sa1111_adjust_zones(unsigned long *size, unsigned long *holes);
22#define arch_adjust_zones(size, holes) \ 22#define arch_adjust_zones(size, holes) \
23 sa1111_adjust_zones(size, holes) 23 sa1111_adjust_zones(size, holes)
24 24
25#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) 25#define ARM_DMA_ZONE_SIZE SZ_1M
26#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_1M)
27 26
28#endif 27#endif
29#endif 28#endif
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
index 9afb17000008..48fe84b1f278 100644
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -32,8 +32,7 @@ static inline void __arch_adjust_zones(unsigned long *zone_size, unsigned long *
32#define arch_adjust_zones(size, holes) \ 32#define arch_adjust_zones(size, holes) \
33 __arch_adjust_zones(size, holes) 33 __arch_adjust_zones(size, holes)
34 34
35#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1) 35#define ARM_DMA_ZONE_SIZE SZ_4M
36#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M)
37 36
38#endif 37#endif
39 38