diff options
author | Michal Simek <michal.simek@xilinx.com> | 2021-07-27 16:17:31 +0200 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2021-08-06 09:32:02 +0200 |
commit | 3d238435b216976d8a7dacd2cfddf3ba4c0d2f74 (patch) | |
tree | 674760929624db87a5971a4b42cac076f8c30bf8 | |
parent | e49f2a7f855f84a9b4c3bc0bae9615983bd42715 (diff) | |
download | u-boot-3d238435b216976d8a7dacd2cfddf3ba4c0d2f74.tar.gz |
xilinx: zynqmp: use zynqmp_mmio_read() in multi_boot()
When U-Boot runs in EL2 there is no access to csu_base registers that's why
this has to be done via firmware interface to find out multi boot register
value. Till now this function is called only from SPL in EL3.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index eb67116d5b..1b0356c84c 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -346,9 +346,12 @@ int board_early_init_f(void) static int multi_boot(void) { - u32 multiboot; + u32 multiboot = 0; + int ret; - multiboot = readl(&csu_base->multi_boot); + ret = zynqmp_mmio_read((ulong)&csu_base->multi_boot, &multiboot); + if (ret) + return -EINVAL; return multiboot; } |