From 2b29dec5e07dc08f6910e35452b62e78dd1e73c6 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Wed, 13 Apr 2022 11:52:19 +0300 Subject: [PATCH] MPFS: Fix mtimecmp address MTIMECMP0 was incorrect --- arch/risc-v/src/mpfs/mpfs_timerisr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/risc-v/src/mpfs/mpfs_timerisr.c b/arch/risc-v/src/mpfs/mpfs_timerisr.c index 1e9ee184f6..e2ae7a2158 100755 --- a/arch/risc-v/src/mpfs/mpfs_timerisr.c +++ b/arch/risc-v/src/mpfs/mpfs_timerisr.c @@ -67,7 +67,7 @@ void up_timer_initialize(void) uintptr_t hart_id = riscv_mhartid(); struct oneshot_lowerhalf_s *lower = riscv_mtimer_initialize( - MPFS_CLINT_MTIME, MPFS_CLINT_MTIMECMP0 + hart_id, + MPFS_CLINT_MTIME, MPFS_CLINT_MTIMECMP0 + hart_id * sizeof(uintptr_t), RISCV_IRQ_MTIMER, MTIMER_FREQ); DEBUGASSERT(lower);