[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>
This commit is contained in:
Russell King 2008-11-29 10:50:22 +00:00 committed by Russell King
parent 5bed1fb328
commit b9c78022b0
14 changed files with 20 additions and 44 deletions

View File

@ -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>

View File

@ -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 */

View File

@ -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)

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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 */

View File

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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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