On Fri, Sep 11, 2026 at 04:35:22PM +0300, Nikita Shubin wrote:
> This series addresses two issues with the generic RISC-V timer driver.
> 
> Patch 1 marks timer_early_get_rate() and timer_early_get_count() as __weak
> to prevent link conflicts with other drivers (e.g., ACLINT MTIMER) that may
> also provide their own implementation.
> 
> Patch 2 adds proper M‑mode support: timer_early_get_rate() is now defined
> for M‑mode using RISCV_MMODE_TIMER_FREQ, and timer_early_get_count() is
> no longer guarded by RISCV_SMODE, making it available whenever
> CONFIG_TIMER_EARLY is enabled. This is necessary because functions like
> net_random_ethaddr() rely on get_ticks() which uses timer_early_get_count().

For the whole series,

Reviewed-by: Yao Zi <[email protected]>

Thanks for your work!

Regards,
Yao Zi

> ---
> Nikita Shubin (2):
>       riscv: timer: Make RISCV_TIMER definitions weak
>       riscv: timer: Enable early timer for M‑mode
> 
>  drivers/timer/Kconfig       |  9 +++++++--
>  drivers/timer/riscv_timer.c | 16 +++++++++++-----
>  2 files changed, 18 insertions(+), 7 deletions(-)
> ---
> base-commit: cc557af4553382f6f50e3ed62b9577054e7bc54f
> change-id: 20260904-riscv_fix_early_timer_mmode-174f3ee4e106
> 
> Best regards,
> -- 
> Nikita Shubin
> 

Reply via email to