arm64: zynqmp: Do not use hardcoded address in do_zynqmp_reboot()
authorMichal Simek <michal.simek@amd.com>
Mon, 9 Dec 2024 09:10:56 +0000 (10:10 +0100)
committerMichal Simek <michal.simek@amd.com>
Tue, 14 Jan 2025 07:29:45 +0000 (08:29 +0100)
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@amd.com>
Link: https://lore.kernel.org/r/3e5c6ea426b81cc73b90e6425764e41a98deb2a6.1733735454.git.michal.simek@amd.com
arch/arm/mach-zynqmp/zynqmp.c

index 8ee25e4..3aa2185 100644 (file)
@@ -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;