diff mbox series

[07/11] mach-snapdragon: set loadaddr

Message ID 20240809-b4-snapdragon-improvements-v1-7-7c353f3e8f74@linaro.org
State New
Headers show
Series mach-snapdragon: various improvements for newer boards | expand

Commit Message

Caleb Connolly Aug. 8, 2024, 11:59 p.m. UTC
This variable is used by default in some commands, set it to the same as
kernel_addr_r.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 arch/arm/mach-snapdragon/board.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index 8c0c7394698b..43bff2c5e5f8 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -423,29 +423,31 @@  void __weak qcom_late_init(void)
 int board_late_init(void)
 {
 	struct lmb lmb;
 	u32 status = 0;
-	phys_addr_t fdt_addr;
+	phys_addr_t addr;
 
 	lmb_init_and_reserve(&lmb, gd->bd, (void *)gd->fdt_blob);
 
 	/* We need to be fairly conservative here as we support boards with just 1G of TOTAL RAM */
-	status |= env_set_hex("kernel_addr_r", addr_alloc(&lmb, SZ_128M));
+	addr = addr_alloc(&lmb, SZ_128M);
+	status |= env_set_hex("kernel_addr_r", addr);
+	status |= env_set_hex("loadaddr", addr);
 	status |= env_set_hex("ramdisk_addr_r", addr_alloc(&lmb, SZ_128M));
 	status |= env_set_hex("kernel_comp_addr_r", addr_alloc(&lmb, KERNEL_COMP_SIZE));
 	status |= env_set_hex("kernel_comp_size", KERNEL_COMP_SIZE);
 	if (IS_ENABLED(CONFIG_FASTBOOT))
 		status |= env_set_hex("fastboot_addr_r", addr_alloc(&lmb, FASTBOOT_BUF_SIZE));
 	status |= env_set_hex("scriptaddr", addr_alloc(&lmb, SZ_4M));
 	status |= env_set_hex("pxefile_addr_r", addr_alloc(&lmb, SZ_4M));
-	fdt_addr = addr_alloc(&lmb, SZ_2M);
-	status |= env_set_hex("fdt_addr_r", fdt_addr);
+	addr = addr_alloc(&lmb, SZ_2M);
+	status |= env_set_hex("fdt_addr_r", addr);
 
 	if (status)
 		log_warning("%s: Failed to set run time variables\n", __func__);
 
 	/* By default copy U-Boots FDT, it will be used as a fallback */
-	memcpy((void *)fdt_addr, (void *)gd->fdt_blob, gd->fdt_size);
+	memcpy((void *)addr, (void *)gd->fdt_blob, gd->fdt_size);
 
 	configure_env();
 	qcom_late_init();