Commit b9c78022 authored by Russell King's avatar Russell King Committed by Russell King

[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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5bed1fb3
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
typedef unsigned int dmach_t; typedef unsigned int dmach_t;
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/memory.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/scatterlist.h> #include <asm/scatterlist.h>
#include <mach/dma.h> #include <mach/dma.h>
......
...@@ -8,9 +8,3 @@ ...@@ -8,9 +8,3 @@
* is licensed "as is" without any warranty of any kind, whether express * is licensed "as is" without any warranty of any kind, whether express
* or implied. * or implied.
*/ */
#ifndef __ASM_ARCH_DMA_H
#define __ASM_ARCH_DMA_H
#define MAX_DMA_ADDRESS 0xffffffff
#endif /* __ASM_ARCH_DMA_H */
...@@ -8,13 +8,6 @@ ...@@ -8,13 +8,6 @@
#ifndef __ASM_ARCH_DMA_H #ifndef __ASM_ARCH_DMA_H
#define __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) #if defined (CONFIG_CPU_H7201)
#define MAX_DMA_CHANNELS 3 #define MAX_DMA_CHANNELS 3
#elif defined (CONFIG_CPU_H7202) #elif defined (CONFIG_CPU_H7202)
......
...@@ -8,5 +8,14 @@ ...@@ -8,5 +8,14 @@
#define __ASM_ARCH_MEMORY_H #define __ASM_ARCH_MEMORY_H
#define PHYS_OFFSET UL(0x40000000) #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 #endif
...@@ -8,12 +8,3 @@ ...@@ -8,12 +8,3 @@
* published by the Free Software Foundation. * 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 */
...@@ -22,6 +22,7 @@ void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); ...@@ -22,6 +22,7 @@ void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
ixp4xx_adjust_zones(node, size, holes) ixp4xx_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (SZ_64M - 1) #define ISA_DMA_THRESHOLD (SZ_64M - 1)
#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
#endif #endif
......
...@@ -11,13 +11,6 @@ ...@@ -11,13 +11,6 @@
/* DMA is not yet implemented! It should be the same as acorn, copy over.. */ /* 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 #define DMA_S0 0
#endif /* _ASM_ARCH_DMA_H */ #endif /* _ASM_ARCH_DMA_H */
...@@ -18,4 +18,3 @@ ...@@ -18,4 +18,3 @@
*/ */
#define MAX_DMA_CHANNELS 0 #define MAX_DMA_CHANNELS 0
#define MAX_DMA_ADDRESS ~0
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "platform.h" #include "platform.h"
#define MAX_DMA_ADDRESS 0xffffffff
#define MAX_DMA_CHANNELS 8 #define MAX_DMA_CHANNELS 8
#define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE) #define DMAC_BASE IO_ADDRESS(PNX4008_DMA_CONFIG_BASE)
......
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
#ifndef __ASM_ARCH_DMA_H #ifndef __ASM_ARCH_DMA_H
#define __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 MAX_DMA_CHANNELS 8
#define DMA_0 0 #define DMA_0 0
......
...@@ -16,11 +16,6 @@ ...@@ -16,11 +16,6 @@
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <mach/hardware.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 */ #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 /* We use `virtual` dma channels to hide the fact we have only a limited
......
...@@ -13,4 +13,12 @@ ...@@ -13,4 +13,12 @@
#define PHYS_OFFSET UL(0x30000000) #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 #endif
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
* The rest is not DMAable. See dev / .properties * The rest is not DMAable. See dev / .properties
* in OpenFirmware. * in OpenFirmware.
*/ */
#define MAX_DMA_ADDRESS 0xC0400000
#define MAX_DMA_CHANNELS 8 #define MAX_DMA_CHANNELS 8
#define DMA_ISA_CASCADE 4 #define DMA_ISA_CASCADE 4
......
...@@ -33,6 +33,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig ...@@ -33,6 +33,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
__arch_adjust_zones(node, size, holes) __arch_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1) #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
#define MAX_DMA_ADDRESS 0xC0400000
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment