summaryrefslogtreecommitdiff
path: root/board/highbank
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2021-04-12 01:04:54 +0100
committerTom Rini <trini@konsulko.com>2021-04-20 07:31:12 -0400
commit1238d0143ab8e8c75e6de97b4c5475077c1abbbf (patch)
tree8e75aa57c2e2fcb122e7f740166d5a5bfcb36346 /board/highbank
parentff47d539f28bcae15bc680d2e32fec6cc9551eb4 (diff)
arm: highbank: Do DRAM init from DT
So far U-Boot was hard coding a (surely sufficient) memory size of 512 MB, even though all machines out there have at least 4GB of DRAM. Since U-Boot uses its memory knowledge to populate the EFI memory map, we are missing out here, at best losing everything beyond 4GB on Midway boxes (which typically come with 8GB of DRAM). Since the management processor populated the DT memory node already with the detected DRAM size and configuration, we use that to populate U-Boot's memory bank information, which is the base for the UEFI memory map. This finally allows us to get rid of the NR_DRAM_BANKS=0 hack, that we had in place to avoid U-Boot messing up the DT memory node before loading the kernel. Also, to cover the whole of memory, we need to enable PHYS_64BIT. Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Diffstat (limited to 'board/highbank')
-rw-r--r--board/highbank/highbank.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index 0667a48965..ffb6fd922d 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -8,6 +8,7 @@
#include <cpu_func.h>
#include <env.h>
#include <fdt_support.h>
+#include <fdtdec.h>
#include <init.h>
#include <net.h>
#include <scsi.h>
@@ -84,8 +85,12 @@ int misc_init_r(void)
int dram_init(void)
{
- gd->ram_size = SZ_512M;
- return 0;
+ return fdtdec_setup_mem_size_base();
+}
+
+int dram_init_banksize(void)
+{
+ return fdtdec_setup_memory_banksize();
}
#if defined(CONFIG_OF_BOARD_SETUP)