summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-realview/core.c
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-11-04 12:19:04 +0000
committerCatalin Marinas <catalin.marinas@arm.com>2009-11-05 10:10:36 +0000
commit5b39d1548dc2751f8de89e6f429b6560a137eebb (patch)
treec121a4118a4da4441b8dad03362ebaab98a1867a /arch/arm/mach-realview/core.c
parent9b229fa0951fb47cbc178be4bd8e9ef185b38802 (diff)
downloadblackbird-obmc-linux-5b39d1548dc2751f8de89e6f429b6560a137eebb.tar.gz
blackbird-obmc-linux-5b39d1548dc2751f8de89e6f429b6560a137eebb.zip
RealView: Add default memory configuration
This patch adds a realview_fixup() function called during booting to set up the memory banks. This way there is no need to pass a "mem=" argument on the kernel command line. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/mach-realview/core.c')
-rw-r--r--arch/arm/mach-realview/core.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index a2083b60e3fb..c21b0fd39652 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -788,3 +788,24 @@ void __init realview_timer_init(unsigned int timer_irq)
realview_clocksource_init();
realview_clockevents_init(timer_irq);
}
+
+/*
+ * Setup the memory banks.
+ */
+void realview_fixup(struct machine_desc *mdesc, struct tag *tags, char **from,
+ struct meminfo *meminfo)
+{
+ /*
+ * Most RealView platforms have 512MB contiguous RAM at 0x70000000.
+ * Half of this is mirrored at 0.
+ */
+#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
+ meminfo->bank[0].start = 0x70000000;
+ meminfo->bank[0].size = SZ_512M;
+ meminfo->nr_banks = 1;
+#else
+ meminfo->bank[0].start = 0;
+ meminfo->bank[0].size = SZ_256M;
+ meminfo->nr_banks = 1;
+#endif
+}
OpenPOWER on IntegriCloud