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

[ARM] fix constant values of MAX_DMA_ADDRESS

Since 8d5796d2, we have allowed
PAGE_OFFSET to be configurable, so a constant virtual address
for MAX_DMA_ADDRESS is buggy.  It should be defined in terms of
PAGE_OFFSET rather than a constant virtual address.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent b9c78022
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
* If you set this, you must also set ISA_DMA_THRESHOLD and setup a DMA * If you set this, you must also set ISA_DMA_THRESHOLD and setup a DMA
* zone if this does not cover all possible RAM. * zone if this does not cover all possible RAM.
*/ */
#define MAX_DMA_ADDRESS 0xd0000000 #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
#endif #endif
...@@ -13,12 +13,4 @@ ...@@ -13,12 +13,4 @@
#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
...@@ -33,7 +33,7 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig ...@@ -33,7 +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 #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M)
#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