mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 13:11:31 +00:00
arm64: zynqmp: Access timestamp_ref_ctrl register only if running in el3
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 <sivadur@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
6d0cbbd596
commit
ec60a279ec
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue