Skip to content
Snippets Groups Projects
Commit d1db89f4 authored by Siva Durga Prasad Paladugu's avatar Siva Durga Prasad Paladugu Committed by Michal Simek
Browse files

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: default avatarSiva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: default avatarMichal Simek <michal.simek@xilinx.com>
parent 2f03968e
No related branches found
No related tags found
No related merge requests found
...@@ -343,13 +343,17 @@ int board_late_init(void) ...@@ -343,13 +343,17 @@ int board_late_init(void)
u8 bootmode; u8 bootmode;
const char *mode; const char *mode;
char *new_targets; char *new_targets;
int ret;
if (!(gd->flags & GD_FLG_ENV_DEFAULT)) { if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
debug("Saved variables - Skipping\n"); debug("Saved variables - Skipping\n");
return 0; return 0;
} }
reg = readl(&crlapb_base->boot_mode); ret = zynqmp_mmio_read((ulong)&crlapb_base->boot_mode, &reg);
if (ret)
return -EINVAL;
if (reg >> BOOT_MODE_ALT_SHIFT) if (reg >> BOOT_MODE_ALT_SHIFT)
reg >>= BOOT_MODE_ALT_SHIFT; reg >>= BOOT_MODE_ALT_SHIFT;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment