Commit 1b12050f authored by Russell King's avatar Russell King Committed by Russell King

[ARM] Move zone adjustment for SA1111 on SA11x0 platforms

Unfortunately, using PAGE_SHIFT in asm/arch/memory.h is unsafe, and we
can't include asm/page.h into this file because then we have a circular
dependency.  Move the offending code to arch/arm/common/sa1111.c
instead.
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 8dc39b88
...@@ -132,6 +132,17 @@ static struct sa1111_dev_info sa1111_devices[] = { ...@@ -132,6 +132,17 @@ static struct sa1111_dev_info sa1111_devices[] = {
}, },
}; };
void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes)
{
unsigned int sz = SZ_1M >> PAGE_SHIFT;
if (node != 0)
sz = 0;
size[1] = size[0] - sz;
size[0] = sz;
}
/* /*
* SA1111 interrupt support. Since clearing an IRQ while there are * SA1111 interrupt support. Since clearing an IRQ while there are
* active IRQs causes the interrupt output to pulse, the upper levels * active IRQs causes the interrupt output to pulse, the upper levels
......
...@@ -18,20 +18,10 @@ ...@@ -18,20 +18,10 @@
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
#ifdef CONFIG_SA1111 #ifdef CONFIG_SA1111
static inline void void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
{
unsigned int sz = SZ_1M >> PAGE_SHIFT;
if (node != 0)
sz = 0;
size[1] = size[0] - sz;
size[0] = sz;
}
#define arch_adjust_zones(node, size, holes) \ #define arch_adjust_zones(node, size, holes) \
__arch_adjust_zones(node, size, holes) sa1111_adjust_zones(node, size, holes)
#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) #define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1)
......
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