From c97c5aa83c41a532bc67da356d77da929bc41b9c Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Wed, 4 Nov 2009 12:19:05 +0000 Subject: RealView: Add sparsemem support for the RealView PBX platform The RealView PBX board has two 512MB blocks of memory - one at 0x70000000 (with 256MB mirror at 0) and another at 0x20000000. Only the block at 0x70000000 (or the mirror at 0) may be used for DMA (e.g. framebuffer). This patch adds the sparsemem definitions to allow the use of all the memory split as follows: 256MB @ 0x00000000 (ZONE_DMA) 512MB @ 0x20000000 (ZONE_NORMAL) 256MB @ 0x80000000 (ZONE_NORMAL) Signed-off-by: Catalin Marinas --- arch/arm/mach-realview/realview_pbx.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-realview/realview_pbx.c') diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c index 5d09d8b..ec39488 100644 --- a/arch/arm/mach-realview/realview_pbx.c +++ b/arch/arm/mach-realview/realview_pbx.c @@ -304,6 +304,26 @@ static struct sys_timer realview_pbx_timer = { .init = realview_pbx_timer_init, }; +static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags, + char **from, struct meminfo *meminfo) +{ +#ifdef CONFIG_SPARSEMEM + /* + * Memory configuration with SPARSEMEM enabled on RealView PBX (see + * asm/mach/memory.h for more information). + */ + meminfo->bank[0].start = 0; + meminfo->bank[0].size = SZ_256M; + meminfo->bank[1].start = 0x20000000; + meminfo->bank[1].size = SZ_512M; + meminfo->bank[2].start = 0x80000000; + meminfo->bank[2].size = SZ_256M; + meminfo->nr_banks = 3; +#else + realview_fixup(mdesc, tags, from, meminfo); +#endif +} + static void __init realview_pbx_init(void) { int i; @@ -345,7 +365,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX") .phys_io = REALVIEW_PBX_UART0_BASE, .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, .boot_params = PHYS_OFFSET + 0x00000100, - .fixup = realview_fixup, + .fixup = realview_pbx_fixup, .map_io = realview_pbx_map_io, .init_irq = gic_init_irq, .timer = &realview_pbx_timer, -- cgit v1.1