summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-10-01 23:31:26 +0300
committerTom Rini <trini@konsulko.com>2019-10-01 23:31:26 +0300
commitea4316cdb340ce1c05db5d6a869d1840dad68508 (patch)
tree369367086c7c3b82b539d5ff959115c23493be8f
parentf2d2d2247132a1fa033a40ae89afed8dc5ebc1e1 (diff)
parent9de5b89e4c898ec770878eb4848588c635a37bac (diff)
downloadu-boot-ea4316cdb340ce1c05db5d6a869d1840dad68508.tar.xz
Merge tag 'rpi-next-2019.10.2' of https://github.com/mbgg/u-boot
RPi4: Fix amount of memory seen by the kernel.
-rw-r--r--board/raspberrypi/rpi/rpi.c10
-rw-r--r--configs/rpi_4_defconfig2
2 files changed, 11 insertions, 1 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;
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index 2d63197d75..2954e17ac3 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -3,7 +3,7 @@ CONFIG_ARCH_BCM283X=y
CONFIG_SYS_TEXT_BASE=0x00080000
CONFIG_TARGET_RPI_4=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
-CONFIG_NR_DRAM_BANKS=1
+CONFIG_NR_DRAM_BANKS=2
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not set