From 5e7d48f4b0a40e8b067738f07fee96f299fb521c Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Thu, 6 Apr 2023 08:31:48 +0900 Subject: [PATCH] arch: k210: Fix k210 timer on QEMU 6.1 or later Summary: - I noticed that 'sleep 1' on nsh took 10 seconds on QEMU-6.1, though the old version (e.g. QEMU-5.2) works correctly. - I think we should implement PLL for the QEMU environment. However, this fix works as a tentative solution. Impact: - K210 on QEMU only Tested - Tested with QEMU-7.1 Signed-off-by: Masayuki Ishikawa --- arch/risc-v/src/k210/k210_timerisr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/k210/k210_timerisr.c b/arch/risc-v/src/k210/k210_timerisr.c index 661873de54..7c40fc6d03 100644 --- a/arch/risc-v/src/k210/k210_timerisr.c +++ b/arch/risc-v/src/k210/k210_timerisr.c @@ -45,7 +45,7 @@ ****************************************************************************/ #ifdef CONFIG_K210_WITH_QEMU -#define MTIMER_FREQ 10000000 +#define MTIMER_FREQ 1000000 #else #define MTIMER_FREQ (k210_get_cpuclk() / 50) #endif