]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
riscv: image: Use the first DRAM bank for bootm_low
authorSamuel Holland <samuel@sholland.org>
Sun, 12 Sep 2021 16:26:45 +0000 (11:26 -0500)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 7 Oct 2021 08:08:23 +0000 (16:08 +0800)
bootm_low is used as a base address is used to allocate space for the
FDT blob, initrd, cmdline, etc. when booting Linux. Set the default
value for RISC-V to the start of the first DRAM bank, so platforms can
get their DRAM layout from the device tree, and do not need to define
CONFIG_SYS_SDRAM_BASE.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
common/image.c

index e199d61a4c3913fc85d0331b2c7bedf5b2f6ad9a..8ac57081fddfd63b0153e2be87d73a229272586d 100644 (file)
@@ -684,7 +684,7 @@ ulong env_get_bootm_low(void)
 
 #if defined(CONFIG_SYS_SDRAM_BASE)
        return CONFIG_SYS_SDRAM_BASE;
-#elif defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE)
+#elif defined(CONFIG_ARM) || defined(CONFIG_MICROBLAZE) || defined(CONFIG_RISCV)
        return gd->bd->bi_dram[0].start;
 #else
        return 0;