riscv/nsbi: fix up_udelay for rv32
This fixes riscv_sbi_get_time for rv32 and NuttSBI is used. Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
This commit is contained in:
parent
4ef3eeb305
commit
a36c168e54
|
@ -111,7 +111,11 @@ uint64_t riscv_sbi_get_time(void)
|
|||
sbiret_t ret = sbi_ecall(SBI_EXT_FIRMWARE, SBI_EXT_FIRMWARE_GET_MTIME,
|
||||
0, 0, 0, 0, 0, 0);
|
||||
|
||||
# ifdef CONFIG_ARCH_RV64
|
||||
return ret.error;
|
||||
# else
|
||||
return (((uint64_t)ret.value << 32) | ret.error);
|
||||
# endif
|
||||
#elif defined(CONFIG_ARCH_RV64)
|
||||
return READ_CSR(CSR_TIME);
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue