diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2017-02-21 17:58:28 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2017-12-14 20:08:22 +0100 |
commit | d1db89f47d4fa4462d9d00fa6cbec322193a748d (patch) | |
tree | 2ca2b6b4e8410a7cfad717b679a31061ef3491b9 /board | |
parent | 2f03968e6c4b9da481fbb2fa1e6ee484681396e6 (diff) | |
download | u-boot-d1db89f47d4fa4462d9d00fa6cbec322193a748d.tar.gz u-boot-d1db89f47d4fa4462d9d00fa6cbec322193a748d.tar.xz u-boot-d1db89f47d4fa4462d9d00fa6cbec322193a748d.zip |
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 <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/xilinx/zynqmp/zynqmp.c | 6 |
1 files changed, 5 insertions, 1 deletions
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; |