[PATCH] arm64: zynqmp: Do not use hardcoded address in do_zynqmp_reboot()

Michal Simek michal.simek at amd.com
Mon Dec 9 10:10:56 CET 2024


multi_boot is already the part of csu_base structure that's why use it
directly instead of using register offset value.

Fixes: fc001432e5b0 ("arm64: zynqmp: Add u-boot command to boot into recovery image")
Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 arch/arm/mach-zynqmp/zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-zynqmp/zynqmp.c b/arch/arm/mach-zynqmp/zynqmp.c
index 8ee25e4c3161..3aa218545bba 100644
--- a/arch/arm/mach-zynqmp/zynqmp.c
+++ b/arch/arm/mach-zynqmp/zynqmp.c
@@ -349,7 +349,7 @@ static int do_zynqmp_reboot(struct cmd_tbl *cmdtp, int flag,
 
 	multiboot = hextoul(argv[2], NULL);
 
-	ret = zynqmp_mmio_write(0xFFCA0010, 0xfff, multiboot);
+	ret = zynqmp_mmio_write((ulong)&csu_base->multi_boot, 0xfff, multiboot);
 	if (ret != 0) {
 		printf("Failed: mmio write\n");
 		return ret;
-- 
2.43.0



More information about the U-Boot mailing list