From bf45c496bbbea031725dbdb83ed1ac8c3b80ed7b Mon Sep 17 00:00:00 2001 From: Camille BAUD Date: Fri, 17 Jan 2025 21:56:11 +0100 Subject: [PATCH] drivers: timer: Remove unused divider setter in RISC-V machine timer This removes a unused function for a unused binding, and is prelude to a refactoring Signed-off-by: Camille BAUD --- drivers/timer/riscv_machine_timer.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/timer/riscv_machine_timer.c b/drivers/timer/riscv_machine_timer.c index 36e29c6aadb..038beddca5c 100644 --- a/drivers/timer/riscv_machine_timer.c +++ b/drivers/timer/riscv_machine_timer.c @@ -138,14 +138,6 @@ static void set_mtimecmp(uint64_t time) #endif } -static void set_divider(void) -{ -#ifdef MTIMER_HAS_DIVIDER - *(volatile uint32_t *)MTIMEDIV_REG = - CONFIG_RISCV_MACHINE_TIMER_SYSTEM_CLOCK_DIVIDER; -#endif -} - static uint64_t mtime(void) { #ifdef CONFIG_64BIT @@ -240,9 +232,6 @@ uint64_t sys_clock_cycle_get_64(void) static int sys_clock_driver_init(void) { - - set_divider(); - IRQ_CONNECT(TIMER_IRQN, 0, timer_isr, NULL, 0); last_ticks = mtime() / CYC_PER_TICK; last_count = last_ticks * CYC_PER_TICK;