[PATCH 08/12] ARM: rpi_b: drop RAM size to 128M

Stephen Warren swarren at wwwdotorg.org
Tue Jul 3 22:02:51 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>
---
 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 b9595f9..9f74731 100644
--- a/include/configs/rpi_b.h
+++ b/include/configs/rpi_b.h
@@ -36,6 +36,13 @@
 #define CONFIG_NR_DRAM_BANKS		1
 #define CONFIG_SYS_TEXT_BASE		0x00008000
 #define CONFIG_SYS_SDRAM_BASE		0x00000000
+/*
+ * 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_UBOOT_BASE		CONFIG_SYS_TEXT_BASE
 #define CONFIG_SYS_INIT_RAM_SIZE	SZ_4K
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_SDRAM_BASE + \
-- 
1.7.9.5




More information about the linux-rpi-kernel mailing list