diff options
author | Biwen Li <biwen.li@nxp.com> | 2020-07-02 11:13:01 +0800 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2020-07-27 14:16:29 +0530 |
commit | e70e10bc499de3e4c9090430249f37fe963e319c (patch) | |
tree | 474caa918cc2763b9b88d8a440feb9ad410316d2 /board/freescale/ls1046aqds/ls1046aqds.c | |
parent | 9c31c53564a4bbb888c7ba0515eced303ac4de02 (diff) |
freescale: ls1046aqds: enable secure system counter
Enable secure system counter in board_early_init_f for udelay()
to fix a bug that always return 0 by timer_read_counter()
when boot from qspi(No TFA)
Signed-off-by: Biwen Li <biwen.li@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Diffstat (limited to 'board/freescale/ls1046aqds/ls1046aqds.c')
-rw-r--r-- | board/freescale/ls1046aqds/ls1046aqds.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/board/freescale/ls1046aqds/ls1046aqds.c b/board/freescale/ls1046aqds/ls1046aqds.c index d54bc6dea1..de55a5d557 100644 --- a/board/freescale/ls1046aqds/ls1046aqds.c +++ b/board/freescale/ls1046aqds/ls1046aqds.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2016 Freescale Semiconductor, Inc. - * Copyright 2019 NXP + * Copyright 2019-2020 NXP */ #include <common.h> @@ -323,6 +323,7 @@ int i2c_multiplexer_select_vid_channel(u8 channel) int board_early_init_f(void) { + u32 __iomem *cntcr = (u32 *)CONFIG_SYS_FSL_TIMER_ADDR; #ifdef CONFIG_HAS_FSL_XHCI_USB struct ccsr_scfg *scfg = (struct ccsr_scfg *)CONFIG_SYS_FSL_SCFG_ADDR; u32 usb_pwrfault; @@ -331,6 +332,11 @@ int board_early_init_f(void) u8 uart; #endif + /* + * Enable secure system counter for timer + */ + out_le32(cntcr, 0x1); + #ifdef CONFIG_SYS_I2C #ifdef CONFIG_SYS_I2C_EARLY_INIT i2c_early_init_f(); |