aboutsummaryrefslogtreecommitdiff
path: root/board/sunxi
diff options
context:
space:
mode:
authorPeng Fan2022-04-13 17:47:22 +0800
committerTom Rini2022-04-21 15:27:18 -0400
commit151a030063898e5c8b03b40c3a96b073db0b0dc7 (patch)
tree91f01f0434711bb9c31a311c0ba0e876c9627a8f /board/sunxi
parentc5b9bf5518411c72a3763371049cfabeb5f16633 (diff)
arm: set cntfrq_el0 if CONFIG_COUNTER_FREQUENCY is valid
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/sunxi')
-rw-r--r--board/sunxi/board.c6
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
}
}