From: Siva Durga Prasad Paladugu Date: Tue, 21 Feb 2017 12:28:28 +0000 (+0530) Subject: arm64: zynqmp: Read boot mode register using zynqmp_mmio_read X-Git-Tag: v2018.01-rc2~8^2~16 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=d1db89f47d4fa4462d9d00fa6cbec322193a748d;p=u-boot arm64: zynqmp: Read boot mode register using zynqmp_mmio_read Dont read boot mode register directly read it using zynqmp_mmio_read(). Signed-off-by: Siva Durga Prasad Paladugu Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index f769db7e81..8c859ed8ff 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;