diff options
author | Peng Fan <peng.fan@nxp.com> | 2022-04-13 17:47:22 +0800 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-21 15:27:18 -0400 |
commit | 151a030063898e5c8b03b40c3a96b073db0b0dc7 (patch) | |
tree | 91f01f0434711bb9c31a311c0ba0e876c9627a8f /board | |
parent | c5b9bf5518411c72a3763371049cfabeb5f16633 (diff) | |
download | u-boot-151a030063898e5c8b03b40c3a96b073db0b0dc7.tar.gz |
arm: set cntfrq_el0 if CONFIG_COUNTER_FREQUENCY is validWIP/2022-04-21-further-cleanups
Since COUNTER_FREQUENCY is obselete, so set cntfrq_el0 if
CONFIG_COUNTER_FREQUENCY is valid
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@vrull.eu>
Diffstat (limited to 'board')
-rw-r--r-- | board/sunxi/board.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 89324159d55..371ed9eebaf 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -202,14 +202,14 @@ int board_init(void) * we avoid the risk of writing to it. */ asm volatile("mrc p15, 0, %0, c14, c0, 0" : "=r"(freq)); - if (freq != COUNTER_FREQUENCY) { + if (freq != CONFIG_COUNTER_FREQUENCY) { debug("arch timer frequency is %d Hz, should be %d, fixing ...\n", - freq, COUNTER_FREQUENCY); + freq, CONFIG_COUNTER_FREQUENCY); #ifdef CONFIG_NON_SECURE printf("arch timer frequency is wrong, but cannot adjust it\n"); #else asm volatile("mcr p15, 0, %0, c14, c0, 0" - : : "r"(COUNTER_FREQUENCY)); + : : "r"(CONFIG_COUNTER_FREQUENCY)); #endif } } |