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

Michal Simek michal.simek at amd.com
Tue Dec 17 12:03:46 CET 2024



On 12/9/24 10:10, Michal Simek wrote:
> 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;

Applied.
M


More information about the U-Boot mailing list