diff options
-rw-r--r-- | arch/arm/include/asm/mach/arch.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-clps711x/edb7211-arch.c | 8 | ||||
-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 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmt5.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/palmtreo.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-h1940.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx1950.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2440/mach-rx3715.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-u300/u300.c | 17 | ||||
-rw-r--r-- | arch/arm/mm/init.c | 5 | ||||
-rw-r--r-- | arch/arm/mm/mm.h | 3 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 63 | ||||
-rw-r--r-- | arch/arm/mm/nommu.c | 2 |
16 files changed, 98 insertions, 63 deletions
diff --git a/arch/arm/include/asm/mach/arch.h b/arch/arm/include/asm/mach/arch.h index c59842dc7cb8..d425f2b6efeb 100644 --- a/arch/arm/include/asm/mach/arch.h +++ b/arch/arm/include/asm/mach/arch.h | |||
@@ -37,6 +37,7 @@ struct machine_desc { | |||
37 | void (*fixup)(struct machine_desc *, | 37 | void (*fixup)(struct machine_desc *, |
38 | struct tag *, char **, | 38 | struct tag *, char **, |
39 | struct meminfo *); | 39 | struct meminfo *); |
40 | void (*reserve)(void);/* reserve mem blocks */ | ||
40 | void (*map_io)(void);/* IO mapping function */ | 41 | void (*map_io)(void);/* IO mapping function */ |
41 | void (*init_irq)(void); | 42 | void (*init_irq)(void); |
42 | struct sys_timer *timer; /* system tick timer */ | 43 | struct sys_timer *timer; /* system tick timer */ |
diff --git a/arch/arm/mach-clps711x/edb7211-arch.c b/arch/arm/mach-clps711x/edb7211-arch.c index 41a4425617c1..077f4051a06a 100644 --- a/arch/arm/mach-clps711x/edb7211-arch.c +++ b/arch/arm/mach-clps711x/edb7211-arch.c | |||
@@ -18,6 +18,7 @@ | |||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
19 | */ | 19 | */ |
20 | #include <linux/init.h> | 20 | #include <linux/init.h> |
21 | #include <linux/bootmem.h> | ||
21 | #include <linux/types.h> | 22 | #include <linux/types.h> |
22 | #include <linux/string.h> | 23 | #include <linux/string.h> |
23 | 24 | ||
@@ -29,6 +30,12 @@ | |||
29 | 30 | ||
30 | extern void edb7211_map_io(void); | 31 | extern void edb7211_map_io(void); |
31 | 32 | ||
33 | /* Reserve screen memory region at the start of main system memory. */ | ||
34 | static void __init edb7211_reserve(void) | ||
35 | { | ||
36 | reserve_bootmem(PHYS_OFFSET, 0x00020000, BOOTMEM_DEFAULT); | ||
37 | } | ||
38 | |||
32 | static void __init | 39 | static void __init |
33 | fixup_edb7211(struct machine_desc *desc, struct tag *tags, | 40 | fixup_edb7211(struct machine_desc *desc, struct tag *tags, |
34 | char **cmdline, struct meminfo *mi) | 41 | char **cmdline, struct meminfo *mi) |
@@ -55,6 +62,7 @@ MACHINE_START(EDB7211, "CL-EDB7211 (EP7211 eval board)") | |||
55 | .boot_params = 0xc0020100, /* 0xc0000000 - 0xc001ffff can be video RAM */ | 62 | .boot_params = 0xc0020100, /* 0xc0000000 - 0xc001ffff can be video RAM */ |
56 | .fixup = fixup_edb7211, | 63 | .fixup = fixup_edb7211, |
57 | .map_io = edb7211_map_io, | 64 | .map_io = edb7211_map_io, |
65 | .reserve = edb7211_reserve, | ||
58 | .init_irq = clps711x_init_irq, | 66 | .init_irq = clps711x_init_irq, |
59 | .timer = &clps711x_timer, | 67 | .timer = &clps711x_timer, |
60 | MACHINE_END | 68 | MACHINE_END |
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, |
diff --git a/arch/arm/mach-pxa/palmt5.c b/arch/arm/mach-pxa/palmt5.c index 5305a3993e69..39fd788ab63b 100644 --- a/arch/arm/mach-pxa/palmt5.c +++ b/arch/arm/mach-pxa/palmt5.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/irq.h> | 21 | #include <linux/irq.h> |
22 | #include <linux/gpio_keys.h> | 22 | #include <linux/gpio_keys.h> |
23 | #include <linux/input.h> | 23 | #include <linux/input.h> |
24 | #include <linux/bootmem.h> | ||
24 | #include <linux/pda_power.h> | 25 | #include <linux/pda_power.h> |
25 | #include <linux/pwm_backlight.h> | 26 | #include <linux/pwm_backlight.h> |
26 | #include <linux/gpio.h> | 27 | #include <linux/gpio.h> |
@@ -396,6 +397,11 @@ static void __init palmt5_udc_init(void) | |||
396 | } | 397 | } |
397 | } | 398 | } |
398 | 399 | ||
400 | static void __init palmt5_reserve(void) | ||
401 | { | ||
402 | reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
403 | } | ||
404 | |||
399 | static void __init palmt5_init(void) | 405 | static void __init palmt5_init(void) |
400 | { | 406 | { |
401 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); | 407 | pxa2xx_mfp_config(ARRAY_AND_SIZE(palmt5_pin_config)); |
@@ -421,6 +427,7 @@ MACHINE_START(PALMT5, "Palm Tungsten|T5") | |||
421 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, | 427 | .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, |
422 | .boot_params = 0xa0000100, | 428 | .boot_params = 0xa0000100, |
423 | .map_io = pxa_map_io, | 429 | .map_io = pxa_map_io, |
430 | .reserve = palmt5_reserve, | ||
424 | .init_irq = pxa27x_init_irq, | 431 | .init_irq = pxa27x_init_irq, |
425 | .timer = &pxa_timer, | 432 | .timer = &pxa_timer, |
426 | .init_machine = palmt5_init | 433 | .init_machine = palmt5_init |
diff --git a/arch/arm/mach-pxa/palmtreo.c b/arch/arm/mach-pxa/palmtreo.c index d8b4469607a1..f5db4f7d7158 100644 --- a/arch/arm/mach-pxa/palmtreo.c +++ b/arch/arm/mach-pxa/palmtreo.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/irq.h> | 20 | #include <linux/irq.h> |
21 | #include <linux/gpio_keys.h> | 21 | #include <linux/gpio_keys.h> |
22 | #include <linux/input.h> | 22 | #include <linux/input.h> |
23 | #include <linux/bootmem.h> | ||
23 | #include <linux/pda_power.h> | 24 | #include <linux/pda_power.h> |
24 | #include <linux/pwm_backlight.h> | 25 | #include <linux/pwm_backlight.h> |
25 | #include <linux/gpio.h> | 26 | #include <linux/gpio.h> |
@@ -633,6 +634,12 @@ static void __init treo_lcd_power_init(void) | |||
633 | treo_lcd_screen.pxafb_lcd_power = treo_lcd_power; | 634 | treo_lcd_screen.pxafb_lcd_power = treo_lcd_power; |
634 | } | 635 | } |
635 | 636 | ||
637 | static void __init treo_reserve(void) | ||
638 | { | ||
639 | reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
640 | reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
641 | } | ||
642 | |||
636 | static void __init treo_init(void) | 643 | static void __init treo_init(void) |
637 | { | 644 | { |
638 | pxa_set_ffuart_info(NULL); | 645 | pxa_set_ffuart_info(NULL); |
@@ -668,6 +675,7 @@ MACHINE_START(TREO680, "Palm Treo 680") | |||
668 | .io_pg_offst = io_p2v(0x40000000), | 675 | .io_pg_offst = io_p2v(0x40000000), |
669 | .boot_params = 0xa0000100, | 676 | .boot_params = 0xa0000100, |
670 | .map_io = pxa_map_io, | 677 | .map_io = pxa_map_io, |
678 | .reserve = treo_reserve, | ||
671 | .init_irq = pxa27x_init_irq, | 679 | .init_irq = pxa27x_init_irq, |
672 | .timer = &pxa_timer, | 680 | .timer = &pxa_timer, |
673 | .init_machine = treo680_init, | 681 | .init_machine = treo680_init, |
@@ -691,6 +699,7 @@ MACHINE_START(CENTRO, "Palm Centro 685") | |||
691 | .io_pg_offst = io_p2v(0x40000000), | 699 | .io_pg_offst = io_p2v(0x40000000), |
692 | .boot_params = 0xa0000100, | 700 | .boot_params = 0xa0000100, |
693 | .map_io = pxa_map_io, | 701 | .map_io = pxa_map_io, |
702 | .reserve = treo_reserve, | ||
694 | .init_irq = pxa27x_init_irq, | 703 | .init_irq = pxa27x_init_irq, |
695 | .timer = &pxa_timer, | 704 | .timer = &pxa_timer, |
696 | .init_machine = centro_init, | 705 | .init_machine = centro_init, |
diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c index 779b45b3f80f..2407aab4d1b8 100644 --- a/arch/arm/mach-s3c2410/mach-h1940.c +++ b/arch/arm/mach-s3c2410/mach-h1940.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/bootmem.h> | ||
18 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/sysdev.h> | 21 | #include <linux/sysdev.h> |
@@ -304,6 +305,13 @@ static void __init h1940_map_io(void) | |||
304 | s3c_pm_init(); | 305 | s3c_pm_init(); |
305 | } | 306 | } |
306 | 307 | ||
308 | /* H1940 and RX3715 need to reserve this for suspend */ | ||
309 | static void __init h1940_reserve(void) | ||
310 | { | ||
311 | reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); | ||
312 | reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); | ||
313 | } | ||
314 | |||
307 | static void __init h1940_init_irq(void) | 315 | static void __init h1940_init_irq(void) |
308 | { | 316 | { |
309 | s3c24xx_init_irq(); | 317 | s3c24xx_init_irq(); |
@@ -346,6 +354,7 @@ MACHINE_START(H1940, "IPAQ-H1940") | |||
346 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 354 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
347 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 355 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
348 | .map_io = h1940_map_io, | 356 | .map_io = h1940_map_io, |
357 | .reserve = h1940_reserve, | ||
349 | .init_irq = h1940_init_irq, | 358 | .init_irq = h1940_init_irq, |
350 | .init_machine = h1940_init, | 359 | .init_machine = h1940_init, |
351 | .timer = &s3c24xx_timer, | 360 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c2440/mach-rx1950.c b/arch/arm/mach-s3c2440/mach-rx1950.c index 8603b577a24b..f26d5d60c13d 100644 --- a/arch/arm/mach-s3c2440/mach-rx1950.c +++ b/arch/arm/mach-s3c2440/mach-rx1950.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/bootmem.h> | ||
18 | #include <linux/delay.h> | 19 | #include <linux/delay.h> |
19 | #include <linux/timer.h> | 20 | #include <linux/timer.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
@@ -570,12 +571,20 @@ static void __init rx1950_init_machine(void) | |||
570 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); | 571 | platform_add_devices(rx1950_devices, ARRAY_SIZE(rx1950_devices)); |
571 | } | 572 | } |
572 | 573 | ||
574 | /* H1940 and RX3715 need to reserve this for suspend */ | ||
575 | static void __init rx1950_reserve(void) | ||
576 | { | ||
577 | reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); | ||
578 | reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); | ||
579 | } | ||
580 | |||
573 | MACHINE_START(RX1950, "HP iPAQ RX1950") | 581 | MACHINE_START(RX1950, "HP iPAQ RX1950") |
574 | /* Maintainers: Vasily Khoruzhick */ | 582 | /* Maintainers: Vasily Khoruzhick */ |
575 | .phys_io = S3C2410_PA_UART, | 583 | .phys_io = S3C2410_PA_UART, |
576 | .io_pg_offst = (((u32) S3C24XX_VA_UART) >> 18) & 0xfffc, | 584 | .io_pg_offst = (((u32) S3C24XX_VA_UART) >> 18) & 0xfffc, |
577 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 585 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
578 | .map_io = rx1950_map_io, | 586 | .map_io = rx1950_map_io, |
587 | .reserve = rx1950_reserve, | ||
579 | .init_irq = s3c24xx_init_irq, | 588 | .init_irq = s3c24xx_init_irq, |
580 | .init_machine = rx1950_init_machine, | 589 | .init_machine = rx1950_init_machine, |
581 | .timer = &s3c24xx_timer, | 590 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-s3c2440/mach-rx3715.c b/arch/arm/mach-s3c2440/mach-rx3715.c index d2946de3f365..6ebdb7bcf085 100644 --- a/arch/arm/mach-s3c2440/mach-rx3715.c +++ b/arch/arm/mach-s3c2440/mach-rx3715.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/types.h> | 15 | #include <linux/types.h> |
16 | #include <linux/interrupt.h> | 16 | #include <linux/interrupt.h> |
17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
18 | #include <linux/bootmem.h> | ||
18 | #include <linux/timer.h> | 19 | #include <linux/timer.h> |
19 | #include <linux/init.h> | 20 | #include <linux/init.h> |
20 | #include <linux/tty.h> | 21 | #include <linux/tty.h> |
@@ -191,6 +192,13 @@ static void __init rx3715_map_io(void) | |||
191 | s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); | 192 | s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs)); |
192 | } | 193 | } |
193 | 194 | ||
195 | /* H1940 and RX3715 need to reserve this for suspend */ | ||
196 | static void __init rx3715_reserve(void) | ||
197 | { | ||
198 | reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); | ||
199 | reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); | ||
200 | } | ||
201 | |||
194 | static void __init rx3715_init_irq(void) | 202 | static void __init rx3715_init_irq(void) |
195 | { | 203 | { |
196 | s3c24xx_init_irq(); | 204 | s3c24xx_init_irq(); |
@@ -214,6 +222,7 @@ MACHINE_START(RX3715, "IPAQ-RX3715") | |||
214 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, | 222 | .io_pg_offst = (((u32)S3C24XX_VA_UART) >> 18) & 0xfffc, |
215 | .boot_params = S3C2410_SDRAM_PA + 0x100, | 223 | .boot_params = S3C2410_SDRAM_PA + 0x100, |
216 | .map_io = rx3715_map_io, | 224 | .map_io = rx3715_map_io, |
225 | .reserve = rx3715_reserve, | ||
217 | .init_irq = rx3715_init_irq, | 226 | .init_irq = rx3715_init_irq, |
218 | .init_machine = rx3715_init_machine, | 227 | .init_machine = rx3715_init_machine, |
219 | .timer = &s3c24xx_timer, | 228 | .timer = &s3c24xx_timer, |
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c index d2a0b8847a18..178dca4f9555 100644 --- a/arch/arm/mach-u300/u300.c +++ b/arch/arm/mach-u300/u300.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/ioport.h> | 16 | #include <linux/ioport.h> |
17 | #include <linux/bootmem.h> | ||
17 | #include <linux/platform_device.h> | 18 | #include <linux/platform_device.h> |
18 | #include <linux/io.h> | 19 | #include <linux/io.h> |
19 | #include <mach/hardware.h> | 20 | #include <mach/hardware.h> |
@@ -22,6 +23,21 @@ | |||
22 | #include <asm/mach-types.h> | 23 | #include <asm/mach-types.h> |
23 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
24 | 25 | ||
26 | static void __init u300_reserve(void) | ||
27 | { | ||
28 | /* | ||
29 | * U300 - This platform family can share physical memory | ||
30 | * between two ARM cpus, one running Linux and the other | ||
31 | * running another OS. | ||
32 | */ | ||
33 | #ifdef CONFIG_MACH_U300_SINGLE_RAM | ||
34 | #if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \ | ||
35 | CONFIG_MACH_U300_2MB_ALIGNMENT_FIX | ||
36 | reserve_bootmem(PHYS_OFFSET, 0x00100000, BOOTMEM_DEFAULT); | ||
37 | #endif | ||
38 | #endif | ||
39 | } | ||
40 | |||
25 | static void __init u300_init_machine(void) | 41 | static void __init u300_init_machine(void) |
26 | { | 42 | { |
27 | u300_init_devices(); | 43 | u300_init_devices(); |
@@ -49,6 +65,7 @@ MACHINE_START(U300, MACH_U300_STRING) | |||
49 | .io_pg_offst = ((U300_AHB_PER_VIRT_BASE) >> 18) & 0xfffc, | 65 | .io_pg_offst = ((U300_AHB_PER_VIRT_BASE) >> 18) & 0xfffc, |
50 | .boot_params = BOOT_PARAMS_OFFSET, | 66 | .boot_params = BOOT_PARAMS_OFFSET, |
51 | .map_io = u300_map_io, | 67 | .map_io = u300_map_io, |
68 | .reserve = u300_reserve, | ||
52 | .init_irq = u300_init_irq, | 69 | .init_irq = u300_init_irq, |
53 | .timer = &u300_timer, | 70 | .timer = &u300_timer, |
54 | .init_machine = u300_init_machine, | 71 | .init_machine = u300_init_machine, |
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 4d2720888c50..1a227eea64bd 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -358,7 +358,7 @@ static void arm_memory_present(struct meminfo *mi) | |||
358 | } | 358 | } |
359 | #endif | 359 | #endif |
360 | 360 | ||
361 | void __init bootmem_init(void) | 361 | void __init bootmem_init(struct machine_desc *mdesc) |
362 | { | 362 | { |
363 | struct meminfo *mi = &meminfo; | 363 | struct meminfo *mi = &meminfo; |
364 | unsigned long min, max_low, max_high; | 364 | unsigned long min, max_low, max_high; |
@@ -380,6 +380,9 @@ void __init bootmem_init(void) | |||
380 | */ | 380 | */ |
381 | reserve_special_regions(); | 381 | reserve_special_regions(); |
382 | 382 | ||
383 | if (mdesc->reserve) | ||
384 | mdesc->reserve(); | ||
385 | |||
383 | /* | 386 | /* |
384 | * If the initrd is present, reserve its memory. | 387 | * If the initrd is present, reserve its memory. |
385 | */ | 388 | */ |
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h index 7b19c90ab295..afafe4fc5431 100644 --- a/arch/arm/mm/mm.h +++ b/arch/arm/mm/mm.h | |||
@@ -28,5 +28,6 @@ extern void __flush_dcache_page(struct address_space *mapping, struct page *page | |||
28 | 28 | ||
29 | #endif | 29 | #endif |
30 | 30 | ||
31 | void __init bootmem_init(void); | 31 | struct machine_desc; |
32 | void __init bootmem_init(struct machine_desc *); | ||
32 | void reserve_special_regions(void); | 33 | void reserve_special_regions(void); |
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index ddb1bee6de73..1676d017a93a 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/sort.h> | 17 | #include <linux/sort.h> |
18 | 18 | ||
19 | #include <asm/cputype.h> | 19 | #include <asm/cputype.h> |
20 | #include <asm/mach-types.h> | ||
21 | #include <asm/sections.h> | 20 | #include <asm/sections.h> |
22 | #include <asm/cachetype.h> | 21 | #include <asm/cachetype.h> |
23 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
@@ -831,8 +830,6 @@ static inline void prepare_page_table(void) | |||
831 | */ | 830 | */ |
832 | void __init reserve_special_regions(void) | 831 | void __init reserve_special_regions(void) |
833 | { | 832 | { |
834 | unsigned long res_size = 0; | ||
835 | |||
836 | /* | 833 | /* |
837 | * Register the kernel text and data with bootmem. | 834 | * Register the kernel text and data with bootmem. |
838 | * Note that this can only be in node 0. | 835 | * Note that this can only be in node 0. |
@@ -850,68 +847,14 @@ void __init reserve_special_regions(void) | |||
850 | reserve_bootmem(__pa(swapper_pg_dir), | 847 | reserve_bootmem(__pa(swapper_pg_dir), |
851 | PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT); | 848 | PTRS_PER_PGD * sizeof(pgd_t), BOOTMEM_DEFAULT); |
852 | 849 | ||
853 | /* | ||
854 | * Hmm... This should go elsewhere, but we really really need to | ||
855 | * stop things allocating the low memory; ideally we need a better | ||
856 | * implementation of GFP_DMA which does not assume that DMA-able | ||
857 | * memory starts at zero. | ||
858 | */ | ||
859 | if (machine_is_integrator() || machine_is_cintegrator()) | ||
860 | res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; | ||
861 | |||
862 | /* | ||
863 | * These should likewise go elsewhere. They pre-reserve the | ||
864 | * screen memory region at the start of main system memory. | ||
865 | */ | ||
866 | if (machine_is_edb7211()) | ||
867 | res_size = 0x00020000; | ||
868 | if (machine_is_p720t()) | ||
869 | res_size = 0x00014000; | ||
870 | |||
871 | /* H1940, RX3715 and RX1950 need to reserve this for suspend */ | ||
872 | |||
873 | if (machine_is_h1940() || machine_is_rx3715() | ||
874 | || machine_is_rx1950()) { | ||
875 | reserve_bootmem(0x30003000, 0x1000, BOOTMEM_DEFAULT); | ||
876 | reserve_bootmem(0x30081000, 0x1000, BOOTMEM_DEFAULT); | ||
877 | } | ||
878 | |||
879 | if (machine_is_palmld() || machine_is_palmtx()) { | ||
880 | reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
881 | reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
882 | } | ||
883 | |||
884 | if (machine_is_treo680() || machine_is_centro()) { | ||
885 | reserve_bootmem(0xa0000000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
886 | reserve_bootmem(0xa2000000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
887 | } | ||
888 | |||
889 | if (machine_is_palmt5()) | ||
890 | reserve_bootmem(0xa0200000, 0x1000, BOOTMEM_EXCLUSIVE); | ||
891 | |||
892 | /* | ||
893 | * U300 - This platform family can share physical memory | ||
894 | * between two ARM cpus, one running Linux and the other | ||
895 | * running another OS. | ||
896 | */ | ||
897 | if (machine_is_u300()) { | ||
898 | #ifdef CONFIG_MACH_U300_SINGLE_RAM | ||
899 | #if ((CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1) == 1) && \ | ||
900 | CONFIG_MACH_U300_2MB_ALIGNMENT_FIX | ||
901 | res_size = 0x00100000; | ||
902 | #endif | ||
903 | #endif | ||
904 | } | ||
905 | |||
906 | #ifdef CONFIG_SA1111 | 850 | #ifdef CONFIG_SA1111 |
907 | /* | 851 | /* |
908 | * Because of the SA1111 DMA bug, we want to preserve our | 852 | * Because of the SA1111 DMA bug, we want to preserve our |
909 | * precious DMA-able memory... | 853 | * precious DMA-able memory... |
910 | */ | 854 | */ |
911 | res_size = __pa(swapper_pg_dir) - PHYS_OFFSET; | 855 | reserve_bootmem(PHYS_OFFSET, __pa(swapper_pg_dir) - PHYS_OFFSET, |
856 | BOOTMEM_DEFAULT); | ||
912 | #endif | 857 | #endif |
913 | if (res_size) | ||
914 | reserve_bootmem(PHYS_OFFSET, res_size, BOOTMEM_DEFAULT); | ||
915 | } | 858 | } |
916 | 859 | ||
917 | /* | 860 | /* |
@@ -1056,7 +999,7 @@ void __init paging_init(struct machine_desc *mdesc) | |||
1056 | sanity_check_meminfo(); | 999 | sanity_check_meminfo(); |
1057 | prepare_page_table(); | 1000 | prepare_page_table(); |
1058 | map_lowmem(); | 1001 | map_lowmem(); |
1059 | bootmem_init(); | 1002 | bootmem_init(mdesc); |
1060 | devicemaps_init(mdesc); | 1003 | devicemaps_init(mdesc); |
1061 | kmap_init(); | 1004 | kmap_init(); |
1062 | 1005 | ||
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c index 25376d480b8e..ed58ddbbc5b3 100644 --- a/arch/arm/mm/nommu.c +++ b/arch/arm/mm/nommu.c | |||
@@ -46,7 +46,7 @@ void __init reserve_special_regions(void) | |||
46 | */ | 46 | */ |
47 | void __init paging_init(struct machine_desc *mdesc) | 47 | void __init paging_init(struct machine_desc *mdesc) |
48 | { | 48 | { |
49 | bootmem_init(); | 49 | bootmem_init(mdesc); |
50 | } | 50 | } |
51 | 51 | ||
52 | /* | 52 | /* |