summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2017-02-13 23:28:35 +0000
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-05-09 12:41:37 +0200
commite1b2dff68b57614f363636a63dc2a30676f72c8e (patch)
tree4cb357b75aa719fc53b3619d6b6d1efd6f7fbac2
parent5300e03c62f60349f1d0737d51ab520a1885d788 (diff)
sunxi: SPL: store RAM size in gd
The sunxi SPL was holding the detected RAM size in some local variable only, so it wasn't accessible for other functions. Store the value in gd->ram_size instead, so it can be used later on. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r--board/sunxi/board.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c
index 04a629125e..c6fcb4ce50 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -504,7 +504,6 @@ void i2c_init_board(void)
void sunxi_board_init(void)
{
int power_failed = 0;
- unsigned long ramsize;
#ifdef CONFIG_SY8106A_POWER
power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
@@ -565,9 +564,9 @@ void sunxi_board_init(void)
#endif
#endif
printf("DRAM:");
- ramsize = sunxi_dram_init();
- printf(" %d MiB\n", (int)(ramsize >> 20));
- if (!ramsize)
+ gd->ram_size = sunxi_dram_init();
+ printf(" %d MiB\n", (int)(gd->ram_size >> 20));
+ if (!gd->ram_size)
hang();
/*