Skip to content

Commit

Permalink
drivers: timer: Remove unused divider setter in RISC-V machine timer
Browse files Browse the repository at this point in the history
This removes a unused function for a unused binding,
and is prelude to a refactoring

Signed-off-by: Camille BAUD <[email protected]>
  • Loading branch information
VynDragon committed Jan 17, 2025
1 parent 9c7288e commit b7ec422
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions drivers/timer/riscv_machine_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b7ec422

Please sign in to comment.