From: Siva Durga Prasad Paladugu <siva.durga.palad...@xilinx.com> Access the timestamp ref ctrl register only if runinng at el3 level otherwise just return. This change fixes the issue when CRL APB is marked as secure and accessing when not in el3 causes exception.
Signed-off-by: Siva Durga Prasad Paladugu <siva...@xilinx.com> Signed-off-by: Michal Simek <michal.si...@xilinx.com> --- board/xilinx/zynqmp/zynqmp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 44af49782cce..c198a4d92063 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -277,10 +277,13 @@ int board_early_init_r(void) { u32 val; + if (current_el() != 3) + return 0; + val = readl(&crlapb_base->timestamp_ref_ctrl); val &= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT; - if (current_el() == 3 && !val) { + if (!val) { val = readl(&crlapb_base->timestamp_ref_ctrl); val |= ZYNQMP_CRL_APB_TIMESTAMP_REF_CTRL_CLKACT; writel(val, &crlapb_base->timestamp_ref_ctrl); -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot