diff mbox series

riscv: image: Use the first DRAM bank for bootm_low

Message ID 20210912162646.52573-1-samuel@sholland.org
State Accepted
Commit dd573b6b213e859b9d705aabee3ba09e7e7012d2
Delegated to: Andes
Headers show
Series riscv: image: Use the first DRAM bank for bootm_low | expand

Commit Message

Samuel Holland Sept. 12, 2021, 4:26 p.m. UTC
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(-)

Comments

Leo Liang Sept. 14, 2021, 8:36 a.m. UTC | #1
On Sun, Sep 12, 2021 at 11:26:45AM -0500, Samuel Holland wrote:
> 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(-)

Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
CONFIDENTIALITY NOTICE:

This e-mail (and its attachments) may contain confidential and legally privileged information or information protected from disclosure. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein is strictly prohibited. In this case, please immediately notify the sender by return e-mail, delete the message (and any accompanying documents) and destroy all printed hard copies. Thank you for your cooperation.

Copyright ANDES TECHNOLOGY CORPORATION - All Rights Reserved.
diff mbox series

Patch

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;