[U-Boot] [PATCH 6/9] arm64: zynqmp: Read boot mode register using zynqmp_mmio_read
Michal Simek
michal.simek at xilinx.com
Fri Dec 1 15:20:49 UTC 2017
From: Siva Durga Prasad Paladugu <siva.durga.paladugu at xilinx.com>
Dont read boot mode register directly read it using
zynqmp_mmio_read().
Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
board/xilinx/zynqmp/zynqmp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index f769db7e81b9..8c859ed8ff8b 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -343,13 +343,17 @@ int board_late_init(void)
u8 bootmode;
const char *mode;
char *new_targets;
+ int ret;
if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
debug("Saved variables - Skipping\n");
return 0;
}
- reg = readl(&crlapb_base->boot_mode);
+ ret = zynqmp_mmio_read((ulong)&crlapb_base->boot_mode, ®);
+ if (ret)
+ return -EINVAL;
+
if (reg >> BOOT_MODE_ALT_SHIFT)
reg >>= BOOT_MODE_ALT_SHIFT;
--
1.9.1
More information about the U-Boot
mailing list