platform: Drop timer warm init and exit hooks

Now that driver lifecycle is managed from within the SBI timer core,
platforms need only to initialize the driver once during cold init.
Remove the remaining platform hooks that are no longer used.

Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Samuel Holland
2024-09-02 21:06:50 -07:00
committed by Anup Patel
parent 4500828743
commit 99b01ab610
12 changed files with 25 additions and 121 deletions

View File

@@ -192,6 +192,10 @@ int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot)
if (sbi_hart_has_extension(scratch, SBI_HART_EXT_ZICNTR))
get_time_val = get_ticks;
ret = sbi_platform_timer_init(plat);
if (ret)
return ret;
} else {
if (!time_delta_off)
return SBI_ENOMEM;
@@ -200,10 +204,6 @@ int sbi_timer_init(struct sbi_scratch *scratch, bool cold_boot)
time_delta = sbi_scratch_offset_ptr(scratch, time_delta_off);
*time_delta = 0;
ret = sbi_platform_timer_init(plat, cold_boot);
if (ret)
return ret;
if (timer_dev && timer_dev->warm_init) {
ret = timer_dev->warm_init();
if (ret)
@@ -220,6 +220,4 @@ void sbi_timer_exit(struct sbi_scratch *scratch)
csr_clear(CSR_MIP, MIP_STIP);
csr_clear(CSR_MIE, MIP_MTIP);
sbi_platform_timer_exit(sbi_platform_ptr(scratch));
}