Browse Source

[ARM] move MAX_DMA_ADDRESS to mach/memory.h

Move the definition of MAX_DMA_ADDRESS from mach/dma.h to mach/memory.h,
thereby placing it along side its relative, ISA_DMA_THRESHOLD.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Russell King 16 years ago
parent
commit
b9c78022b0

+ 1 - 0
arch/arm/include/asm/dma.h

@@ -4,6 +4,7 @@
 typedef unsigned int dmach_t;
 
 #include <linux/spinlock.h>
+#include <asm/memory.h>
 #include <asm/system.h>
 #include <asm/scatterlist.h>
 #include <mach/dma.h>

+ 0 - 6
arch/arm/mach-davinci/include/mach/dma.h

@@ -8,9 +8,3 @@
  * is licensed "as is" without any warranty of any kind, whether express
  * or implied.
  */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-#define MAX_DMA_ADDRESS			0xffffffff
-
-#endif /* __ASM_ARCH_DMA_H */

+ 0 - 7
arch/arm/mach-h720x/include/mach/dma.h

@@ -8,13 +8,6 @@
 #ifndef __ASM_ARCH_DMA_H
 #define __ASM_ARCH_DMA_H
 
-/*
- * This is the maximum DMA address that can be DMAd to.
- * There should not be more than (0xd0000000 - 0xc0000000)
- * bytes of RAM.
- */
-#define MAX_DMA_ADDRESS		0xd0000000
-
 #if defined (CONFIG_CPU_H7201)
 #define MAX_DMA_CHANNELS	3
 #elif defined (CONFIG_CPU_H7202)

+ 9 - 0
arch/arm/mach-h720x/include/mach/memory.h

@@ -8,5 +8,14 @@
 #define __ASM_ARCH_MEMORY_H
 
 #define PHYS_OFFSET	UL(0x40000000)
+/*
+ * This is the maximum DMA address that can be DMAd to.
+ * There should not be more than (0xd0000000 - 0xc0000000)
+ * bytes of RAM.
+ *
+ * If you set this, you must also set ISA_DMA_THRESHOLD and setup a DMA
+ * zone if this does not cover all possible RAM.
+ */
+#define MAX_DMA_ADDRESS		0xd0000000
 
 #endif

+ 0 - 9
arch/arm/mach-ixp4xx/include/mach/dma.h

@@ -8,12 +8,3 @@
  * published by the Free Software Foundation.
  *
  */
-#ifndef __ASM_ARCH_DMA_H
-#define __ASM_ARCH_DMA_H
-
-#include <asm/memory.h>
-#include <asm/sizes.h>
-
-#define MAX_DMA_ADDRESS		(PAGE_OFFSET + SZ_64M)
-
-#endif /* _ASM_ARCH_DMA_H */

+ 1 - 0
arch/arm/mach-ixp4xx/include/mach/memory.h

@@ -22,6 +22,7 @@ void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
 	ixp4xx_adjust_zones(node, size, holes)
 
 #define ISA_DMA_THRESHOLD (SZ_64M - 1)
+#define MAX_DMA_ADDRESS		(PAGE_OFFSET + SZ_64M)
 
 #endif
 

+ 0 - 7
arch/arm/mach-l7200/include/mach/dma.h

@@ -11,13 +11,6 @@
 
 /* DMA is not yet implemented! It should be the same as acorn, copy over.. */
 
-/*
- * This is the maximum DMA address that can be DMAd to.
- * There should not be more than (0xd0000000 - 0xc0000000)
- * bytes of RAM.
- */
-#define MAX_DMA_ADDRESS         0xd0000000
-
 #define DMA_S0                  0
 
 #endif /* _ASM_ARCH_DMA_H */

+ 0 - 1
arch/arm/mach-netx/include/mach/dma.h

@@ -18,4 +18,3 @@
  */
 
 #define MAX_DMA_CHANNELS 0
-#define MAX_DMA_ADDRESS ~0

+ 0 - 2
arch/arm/mach-pnx4008/include/mach/dma.h

@@ -16,8 +16,6 @@
 
 #include "platform.h"
 
-#define MAX_DMA_ADDRESS		0xffffffff
-
 #define MAX_DMA_CHANNELS	8
 
 #define DMAC_BASE		IO_ADDRESS(PNX4008_DMA_CONFIG_BASE)

+ 0 - 6
arch/arm/mach-rpc/include/mach/dma.h

@@ -10,12 +10,6 @@
 #ifndef __ASM_ARCH_DMA_H
 #define __ASM_ARCH_DMA_H
 
-/*
- * This is the maximum DMA address that can be DMAd to.
- * There should not be more than (0xd0000000 - 0xc0000000)
- * bytes of RAM.
- */
-#define MAX_DMA_ADDRESS		0xd0000000
 #define MAX_DMA_CHANNELS	8
 
 #define DMA_0			0

+ 0 - 5
arch/arm/mach-s3c2410/include/mach/dma.h

@@ -16,11 +16,6 @@
 #include <linux/sysdev.h>
 #include <mach/hardware.h>
 
-/*
- * This is the maximum DMA address(physical address) that can be DMAd to.
- *
- */
-#define MAX_DMA_ADDRESS		0x40000000
 #define MAX_DMA_TRANSFER_SIZE   0x100000 /* Data Unit is half word  */
 
 /* We use `virtual` dma channels to hide the fact we have only a limited

+ 8 - 0
arch/arm/mach-s3c2410/include/mach/memory.h

@@ -13,4 +13,12 @@
 
 #define PHYS_OFFSET	UL(0x30000000)
 
+/*
+ * This is the maximum DMA address(physical address) that can be DMAd to.
+ *  Err, no, this is a virtual address.  And you must set ISA_DMA_THRESHOLD
+ *  and setup a DMA zone if this restricts the amount of RAM which is
+ *  capable of DMA.
+ */
+#define MAX_DMA_ADDRESS		0x40000000
+
 #endif

+ 0 - 1
arch/arm/mach-shark/include/mach/dma.h

@@ -10,7 +10,6 @@
  * The rest is not DMAable. See dev /  .properties
  * in OpenFirmware.
  */
-#define MAX_DMA_ADDRESS		0xC0400000
 #define MAX_DMA_CHANNELS	8
 #define DMA_ISA_CASCADE         4
 

+ 1 - 0
arch/arm/mach-shark/include/mach/memory.h

@@ -33,6 +33,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
 	__arch_adjust_zones(node, size, holes)
 
 #define ISA_DMA_THRESHOLD	(PHYS_OFFSET + SZ_4M - 1)
+#define MAX_DMA_ADDRESS		0xC0400000
 
 #endif