summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Przywara <[email protected]>2017-04-26 01:32:43 +0100
committerJagan Teki <[email protected]>2017-05-17 23:21:21 +0530
commit414eb6fd86762d1689ec906e3c42c1279031efec (patch)
tree5e1fd3961c4cc0cae6ce9f9e1f061eb03de04da3
parent54522c92917453be4b0395effb8516ec8a432f83 (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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Acked-by: Maxime Ripard <[email protected]> Reviewed-by: Jagan Teki <[email protected]>
-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 4404edb59e0..4248b47cc7f 100644
--- a/board/sunxi/board.c
+++ b/board/sunxi/board.c
@@ -512,7 +512,6 @@ int board_mmc_init(bd_t *bis)
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);
@@ -573,9 +572,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();
/*