Skip to content

Commit

Permalink
[ARM] move MAX_DMA_ADDRESS to mach/memory.h
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King authored and Russell King committed Nov 29, 2008
1 parent 5bed1fb commit b9c7802
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 44 deletions.
1 change: 1 addition & 0 deletions arch/arm/include/asm/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-davinci/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
7 changes: 0 additions & 7 deletions arch/arm/mach-h720x/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions arch/arm/mach-h720x/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions arch/arm/mach-ixp4xx/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 change: 1 addition & 0 deletions arch/arm/mach-ixp4xx/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 0 additions & 7 deletions arch/arm/mach-l7200/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
1 change: 0 additions & 1 deletion arch/arm/mach-netx/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
*/

#define MAX_DMA_CHANNELS 0
#define MAX_DMA_ADDRESS ~0
2 changes: 0 additions & 2 deletions arch/arm/mach-pnx4008/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 0 additions & 6 deletions arch/arm/mach-rpc/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions arch/arm/mach-s3c2410/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions arch/arm/mach-s3c2410/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion arch/arm/mach-shark/include/mach/dma.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shark/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b9c7802

Please sign in to comment.