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

@@ -16,22 +16,7 @@
extern struct fdt_timer *fdt_timer_drivers[];
extern unsigned long fdt_timer_drivers_size;
static struct fdt_timer *current_driver = NULL;
void fdt_timer_exit(void)
{
if (current_driver && current_driver->exit)
current_driver->exit();
}
static int fdt_timer_warm_init(void)
{
if (current_driver && current_driver->warm_init)
return current_driver->warm_init();
return 0;
}
static int fdt_timer_cold_init(void)
int fdt_timer_init(void)
{
int pos, noff, rc;
struct fdt_timer *drv;
@@ -56,7 +41,6 @@ static int fdt_timer_cold_init(void)
continue;
if (rc)
return rc;
current_driver = drv;
/*
* We will have multiple timer devices on multi-die or
@@ -71,16 +55,3 @@ static int fdt_timer_cold_init(void)
*/
return 0;
}
int fdt_timer_init(bool cold_boot)
{
int rc;
if (cold_boot) {
rc = fdt_timer_cold_init();
if (rc)
return rc;
}
return fdt_timer_warm_init();
}

View File

@@ -165,6 +165,4 @@ static const struct fdt_match timer_mtimer_match[] = {
struct fdt_timer fdt_timer_mtimer = {
.match_table = timer_mtimer_match,
.cold_init = timer_mtimer_cold_init,
.warm_init = NULL,
.exit = NULL,
};

View File

@@ -46,6 +46,4 @@ static const struct fdt_match timer_plmt_match[] = {
struct fdt_timer fdt_timer_plmt = {
.match_table = timer_plmt_match,
.cold_init = fdt_plmt_cold_timer_init,
.warm_init = NULL,
.exit = NULL,
};