aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/realview_pbx.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-11-04 07:19:05 -0500
committerCatalin Marinas <catalin.marinas@arm.com>2009-11-05 05:10:36 -0500
commitc97c5aa83c41a532bc67da356d77da929bc41b9c (patch)
treeb01bec4b8151f5697512b180406c54bc5588811a /arch/arm/mach-realview/realview_pbx.c
parent157aed7473d300587e89cc87e13f194e3fa6fa36 (diff)
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 <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mach-realview/realview_pbx.c')
-rw-r--r--arch/arm/mach-realview/realview_pbx.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 5d09d8b4a1cb..ec39488e2b42 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 = {
304 .init = realview_pbx_timer_init, 304 .init = realview_pbx_timer_init,
305}; 305};
306 306
307static void realview_pbx_fixup(struct machine_desc *mdesc, struct tag *tags,
308 char **from, struct meminfo *meminfo)
309{
310#ifdef CONFIG_SPARSEMEM
311 /*
312 * Memory configuration with SPARSEMEM enabled on RealView PBX (see
313 * asm/mach/memory.h for more information).
314 */
315 meminfo->bank[0].start = 0;
316 meminfo->bank[0].size = SZ_256M;
317 meminfo->bank[1].start = 0x20000000;
318 meminfo->bank[1].size = SZ_512M;
319 meminfo->bank[2].start = 0x80000000;
320 meminfo->bank[2].size = SZ_256M;
321 meminfo->nr_banks = 3;
322#else
323 realview_fixup(mdesc, tags, from, meminfo);
324#endif
325}
326
307static void __init realview_pbx_init(void) 327static void __init realview_pbx_init(void)
308{ 328{
309 int i; 329 int i;
@@ -345,7 +365,7 @@ MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
345 .phys_io = REALVIEW_PBX_UART0_BASE, 365 .phys_io = REALVIEW_PBX_UART0_BASE,
346 .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc, 366 .io_pg_offst = (IO_ADDRESS(REALVIEW_PBX_UART0_BASE) >> 18) & 0xfffc,
347 .boot_params = PHYS_OFFSET + 0x00000100, 367 .boot_params = PHYS_OFFSET + 0x00000100,
348 .fixup = realview_fixup, 368 .fixup = realview_pbx_fixup,
349 .map_io = realview_pbx_map_io, 369 .map_io = realview_pbx_map_io,
350 .init_irq = gic_init_irq, 370 .init_irq = gic_init_irq,
351 .timer = &realview_pbx_timer, 371 .timer = &realview_pbx_timer,