summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2019-09-09 19:31:56 +0300
committerMatthias Brugger <mbrugger@suse.com>2019-10-01 12:14:47 +0300
commit9de5b89e4c898ec770878eb4848588c635a37bac (patch)
treea8e271b96345f36548925b5bda057b0393e897ae /board
parent023ff4b88dcec5faa3f9b841bae4d3d232b58ce2 (diff)
downloadu-boot-9de5b89e4c898ec770878eb4848588c635a37bac.tar.xz
rpi4: enable dram bank initialization
When booting through the efi stub, the memory map get's created by reading the dram bank information. Depending on the version of the RPi4 this information changes. Read the device tree to initialize the dram bank data structure. This way the kernel is able to access the whole range of available memory. Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Diffstat (limited to 'board')
-rw-r--r--board/raspberrypi/rpi/rpi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index fa57d50c95..9e0abdda31 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -312,6 +312,16 @@ int dram_init(void)
return 0;
}
+#ifdef CONFIG_OF_BOARD
+#ifdef CONFIG_BCM2711
+int dram_init_banksize(void)
+{
+ return fdtdec_decode_ram_size(gd->fdt_blob, NULL, 0, NULL,
+ (phys_size_t *)&gd->ram_size, gd->bd);
+}
+#endif
+#endif
+
static void set_fdtfile(void)
{
const char *fdtfile;