Mark timer_early_get_rate() and timer_early_get_count() as __weak to avoid link conflict with other drivers (e.g., ACLINT MTIMER) that also provide this function when both are enabled.
Signed-off-by: Nikita Shubin <[email protected]> --- drivers/timer/riscv_timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/timer/riscv_timer.c b/drivers/timer/riscv_timer.c index c2e617317aa..58878445e4c 100644 --- a/drivers/timer/riscv_timer.c +++ b/drivers/timer/riscv_timer.c @@ -39,7 +39,7 @@ static u64 notrace riscv_timer_get_count(struct udevice *dev) * timer_early_get_rate() - Get the timer rate before driver model */ #if IS_ENABLED(CONFIG_TIMER_EARLY) -unsigned long notrace timer_early_get_rate(void) +unsigned long notrace __weak timer_early_get_rate(void) { #if CONFIG_IS_ENABLED(RISCV_SMODE) return RISCV_SMODE_TIMER_FREQ; @@ -53,7 +53,7 @@ unsigned long notrace timer_early_get_rate(void) * timer_early_get_count() - Get the timer count before driver model * */ -u64 notrace timer_early_get_count(void) +u64 notrace __weak timer_early_get_count(void) { return riscv_timer_get_count(NULL); } -- 2.54.0
