Yidi Lin has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85689?usp=email )
Change subject: soc/mediatek/mt8189: Enable timer compensation v2.5 ......................................................................
soc/mediatek/mt8189: Enable timer compensation v2.5
Enable timer compensation v2.5 for MT8189 systimer.
BUG=b:379008996 BRANCH=none TEST=Check SYSTIMER_BASE register is configurated correctly.
Change-Id: I28c051c2e51481464f5dacb4c93f41e4f7e62501 Signed-off-by: Ke Zheng ot_ke.zheng@mediatek.corp-partner.google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/85689 Reviewed-by: Yu-Ping Wu yupingso@google.com Reviewed-by: Yidi Lin yidilin@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/mt8189/Makefile.mk M src/soc/mediatek/mt8189/timer.c 2 files changed, 5 insertions(+), 2 deletions(-)
Approvals: Yidi Lin: Looks good to me, approved build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved
diff --git a/src/soc/mediatek/mt8189/Makefile.mk b/src/soc/mediatek/mt8189/Makefile.mk index 3dc16be..a121413 100644 --- a/src/soc/mediatek/mt8189/Makefile.mk +++ b/src/soc/mediatek/mt8189/Makefile.mk @@ -4,7 +4,7 @@
all-y += ../common/gpio.c ../common/gpio_op.c gpio.c all-$(CONFIG_SPI_FLASH) += spi.c -all-y += timer.c +all-y += ../common/timer_prepare.c timer.c all-y += ../common/uart.c
bootblock-y += bootblock.c diff --git a/src/soc/mediatek/mt8189/timer.c b/src/soc/mediatek/mt8189/timer.c index c010d58..0d9776b 100644 --- a/src/soc/mediatek/mt8189/timer.c +++ b/src/soc/mediatek/mt8189/timer.c @@ -8,8 +8,11 @@ #include <arch/lib_helpers.h> #include <commonlib/helpers.h> #include <delay.h> +#include <soc/timer.h>
void init_timer(void) { - raw_write_cntfrq_el0(13 * MHz); + timer_prepare(); + + raw_write_cntfrq_el0(TIMER_MHZ * MHz); }