u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] riscv: image: Use the first DRAM bank for bootm_low
@ 2021-09-12 16:26 Samuel Holland
  2021-09-14  8:36 ` Leo Liang
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Holland @ 2021-09-12 16:26 UTC (permalink / raw)
  To: Rick Chen, Leo
  Cc: u-boot, Samuel Holland, Andre Przywara, Frieder Schrempf,
	Jernej Skrabec, Naoki Hayama, Simon Glass, Tim Harvey

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>
---

 common/image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/image.c b/common/image.c
index 59c52a1f9ad..1f06413bfa6 100644
--- a/common/image.c
+++ b/common/image.c
@@ -682,7 +682,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;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-09-14  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12 16:26 [PATCH] riscv: image: Use the first DRAM bank for bootm_low Samuel Holland
2021-09-14  8:36 ` Leo Liang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).