diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-05-22 13:18:57 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-07-16 06:06:40 -0400 |
commit | 98c672cf1fa2a56f6f43e3f48b1208b83845582c (patch) | |
tree | 39ac68eb0d260f090cebabff9a2f2cf8c6bcebd2 /arch/arm/mach-integrator | |
parent | b65b4781fbd5846a82cdac0c32818af1a7452d1f (diff) |
ARM: Move platform memory reservations out of generic code
Move the platform specific bootmem memory reservations out of
arch/arm/mm/mmu.c into their respective platform files.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-integrator')
-rw-r--r-- | arch/arm/mach-integrator/common.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-integrator/core.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_ap.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-integrator/integrator_cp.c | 3 |
4 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-integrator/common.h b/arch/arm/mach-integrator/common.h new file mode 100644 index 000000000000..5f96e1518aa9 --- /dev/null +++ b/arch/arm/mach-integrator/common.h | |||
@@ -0,0 +1 @@ | |||
void integrator_reserve(void); | |||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index b02cfc06e0ae..f815a1863f70 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/irq.h> | 16 | #include <linux/irq.h> |
17 | #include <linux/bootmem.h> | ||
17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
18 | #include <linux/smp.h> | 19 | #include <linux/smp.h> |
19 | #include <linux/termios.h> | 20 | #include <linux/termios.h> |
@@ -30,6 +31,7 @@ | |||
30 | #include <asm/system.h> | 31 | #include <asm/system.h> |
31 | #include <asm/leds.h> | 32 | #include <asm/leds.h> |
32 | #include <asm/mach/time.h> | 33 | #include <asm/mach/time.h> |
34 | #include <asm/pgtable.h> | ||
33 | 35 | ||
34 | static struct amba_pl010_data integrator_uart_data; | 36 | static struct amba_pl010_data integrator_uart_data; |
35 | 37 | ||
@@ -215,3 +217,13 @@ void cm_control(u32 mask, u32 set) | |||
215 | } | 217 | } |
216 | 218 | ||
217 | EXPORT_SYMBOL(cm_control); | 219 | EXPORT_SYMBOL(cm_control); |
220 | |||
221 | /* | ||
222 | * We need to stop things allocating the low memory; ideally we need a | ||
223 | * better implementation of GFP_DMA which does not assume that DMA-able | ||
224 | * memory starts at zero. | ||
225 | */ | ||
226 | void __init integrator_reserve(void) | ||
227 | { | ||
228 | reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET, BOOTMEM_DEFAULT); | ||
229 | } | ||
diff --git a/arch/arm/mach-integrator/integrator_ap.c b/arch/arm/mach-integrator/integrator_ap.c index 227cf4d05088..6ab5a03ab9d8 100644 --- a/arch/arm/mach-integrator/integrator_ap.c +++ b/arch/arm/mach-integrator/integrator_ap.c | |||
@@ -48,6 +48,8 @@ | |||
48 | #include <asm/mach/map.h> | 48 | #include <asm/mach/map.h> |
49 | #include <asm/mach/time.h> | 49 | #include <asm/mach/time.h> |
50 | 50 | ||
51 | #include "common.h" | ||
52 | |||
51 | /* | 53 | /* |
52 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx | 54 | * All IO addresses are mapped onto VA 0xFFFx.xxxx, where x.xxxx |
53 | * is the (PA >> 12). | 55 | * is the (PA >> 12). |
@@ -502,6 +504,7 @@ MACHINE_START(INTEGRATOR, "ARM-Integrator") | |||
502 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, | 504 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, |
503 | .boot_params = 0x00000100, | 505 | .boot_params = 0x00000100, |
504 | .map_io = ap_map_io, | 506 | .map_io = ap_map_io, |
507 | .reserve = integrator_reserve, | ||
505 | .init_irq = ap_init_irq, | 508 | .init_irq = ap_init_irq, |
506 | .timer = &ap_timer, | 509 | .timer = &ap_timer, |
507 | .init_machine = ap_init, | 510 | .init_machine = ap_init, |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index cde57b2b83b5..05db40e3c4f7 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -43,6 +43,8 @@ | |||
43 | 43 | ||
44 | #include <plat/timer-sp.h> | 44 | #include <plat/timer-sp.h> |
45 | 45 | ||
46 | #include "common.h" | ||
47 | |||
46 | #define INTCP_PA_FLASH_BASE 0x24000000 | 48 | #define INTCP_PA_FLASH_BASE 0x24000000 |
47 | #define INTCP_FLASH_SIZE SZ_32M | 49 | #define INTCP_FLASH_SIZE SZ_32M |
48 | 50 | ||
@@ -601,6 +603,7 @@ MACHINE_START(CINTEGRATOR, "ARM-IntegratorCP") | |||
601 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, | 603 | .io_pg_offst = ((0xf1600000) >> 18) & 0xfffc, |
602 | .boot_params = 0x00000100, | 604 | .boot_params = 0x00000100, |
603 | .map_io = intcp_map_io, | 605 | .map_io = intcp_map_io, |
606 | .reserve = integrator_reserve, | ||
604 | .init_irq = intcp_init_irq, | 607 | .init_irq = intcp_init_irq, |
605 | .timer = &cp_timer, | 608 | .timer = &cp_timer, |
606 | .init_machine = intcp_init, | 609 | .init_machine = intcp_init, |