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:
parent
a3828c08da
commit
07463e2de1
@ -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;
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user