arch/risc-v: revise mtime address for rv64ilp32

This revises the `mtime` and `mtimecmp` register addresses to
support rv64ilp32.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
Yanfeng Liu 2024-06-18 14:38:39 +08:00 committed by Xiang Xiao
parent a3828c08da
commit 07463e2de1
2 changed files with 4 additions and 4 deletions

View File

@ -42,8 +42,8 @@
struct riscv_mtimer_lowerhalf_s struct riscv_mtimer_lowerhalf_s
{ {
struct oneshot_lowerhalf_s lower; struct oneshot_lowerhalf_s lower;
uintptr_t mtime; uintreg_t mtime;
uintptr_t mtimecmp; uintreg_t mtimecmp;
uint64_t freq; uint64_t freq;
uint64_t alarm; uint64_t alarm;
oneshot_callback_t callback; oneshot_callback_t callback;
@ -347,7 +347,7 @@ static int riscv_mtimer_interrupt(int irq, void *context, void *arg)
****************************************************************************/ ****************************************************************************/
struct oneshot_lowerhalf_s * struct oneshot_lowerhalf_s *
riscv_mtimer_initialize(uintptr_t mtime, uintptr_t mtimecmp, riscv_mtimer_initialize(uintreg_t mtime, uintreg_t mtimecmp,
int irq, uint64_t freq) int irq, uint64_t freq)
{ {
struct riscv_mtimer_lowerhalf_s *priv; struct riscv_mtimer_lowerhalf_s *priv;

View File

@ -40,7 +40,7 @@ extern "C"
#endif #endif
struct oneshot_lowerhalf_s * struct oneshot_lowerhalf_s *
riscv_mtimer_initialize(uintptr_t mtime, uintptr_t mtimecmp, riscv_mtimer_initialize(uintreg_t mtime, uintreg_t mtimecmp,
int irq, uint64_t freq); int irq, uint64_t freq);
#undef EXTERN #undef EXTERN