mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 23:41:23 +01:00
lib: sbi_timer: Drop unnecessary get_platform_ticks wrapper
The device's timer_value callback is already the right prototype to use for the get_time_val function pointer. Signed-off-by: Samuel Holland <samuel@sholland.org> Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
fab0379bb6
commit
295e5f3c69
@@ -44,11 +44,6 @@ static u64 get_ticks(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static u64 get_platform_ticks(void)
|
|
||||||
{
|
|
||||||
return timer_dev->timer_value();
|
|
||||||
}
|
|
||||||
|
|
||||||
static void nop_delay_fn(void *opaque)
|
static void nop_delay_fn(void *opaque)
|
||||||
{
|
{
|
||||||
cpu_relax();
|
cpu_relax();
|
||||||
@@ -167,7 +162,7 @@ void sbi_timer_set_device(const struct sbi_timer_device *dev)
|
|||||||
|
|
||||||
timer_dev = dev;
|
timer_dev = dev;
|
||||||
if (!get_time_val && timer_dev->timer_value)
|
if (!get_time_val && timer_dev->timer_value)
|
||||||
get_time_val = get_platform_ticks;
|
get_time_val = timer_dev->timer_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot)
|
int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot)
|
||||||
|
Reference in New Issue
Block a user