[PATCH V2 09/13] ARM: rpi_b: drop RAM size to 128M

Stephen Warren swarren at wwwdotorg.org
Wed Aug 1 00:13:39 EDT 2012


The board really has 256M. However, the VC (VideoCore co-processor) shares
the RAM, and uses a configurable portion at the top. We tell U-Boot that a
smaller amount of RAM is present in order to avoid stomping on the area
the VC uses.

Extracted from work by Oleksandr Tymoshenko <gonzo at bluezbox.com>.

Signed-off-by: Stephen Warren <swarren at wwwdotorg.org>
---
v2: Modified location new define was inserted, in order to drop a later
    cleanup patch.
---
 board/raspberrypi/rpi_b/rpi_b.c |    2 +-
 include/configs/rpi_b.h         |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/board/raspberrypi/rpi_b/rpi_b.c b/board/raspberrypi/rpi_b/rpi_b.c
index 26df74b..688b0aa 100644
--- a/board/raspberrypi/rpi_b/rpi_b.c
+++ b/board/raspberrypi/rpi_b/rpi_b.c
@@ -21,7 +21,7 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int dram_init(void)
 {
-	gd->ram_size = SZ_256M;
+	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
 
 	return 0;
 }
diff --git a/include/configs/rpi_b.h b/include/configs/rpi_b.h
index 9c96d0e..73482d9 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -37,6 +37,13 @@
 #define CONFIG_SYS_SDRAM_BASE		0x00000000
 #define CONFIG_SYS_TEXT_BASE		0x00008000
 #define CONFIG_SYS_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
+/*
+ * The board really has 256M. However, the VC (VideoCore co-processor) shares
+ * the RAM, and uses a configurable portion at the top. We tell U-Boot that a
+ * smaller amount of RAM is present in order to avoid stomping on the area
+ * the VC uses.
+ */
+#define CONFIG_SYS_SDRAM_SIZE		SZ_128M
 #define CONFIG_SYS_INIT_RAM_SIZE	SZ_4K
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + \
 					 CONFIG_SYS_INIT_RAM_SIZE - \
-- 
1.7.9.5




More information about the linux-rpi-kernel mailing list