mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
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:

committed by
Anup Patel

parent
4500828743
commit
99b01ab610
@@ -147,19 +147,11 @@ static int ariane_ipi_init(bool cold_boot)
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize ariane timer for current HART.
|
||||
* Initialize ariane timer during cold boot.
|
||||
*/
|
||||
static int ariane_timer_init(bool cold_boot)
|
||||
static int ariane_timer_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (cold_boot) {
|
||||
ret = aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -178,19 +178,11 @@ static int openpiton_ipi_init(bool cold_boot)
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize openpiton timer for current HART.
|
||||
* Initialize openpiton timer during cold boot.
|
||||
*/
|
||||
static int openpiton_timer_init(bool cold_boot)
|
||||
static int openpiton_timer_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (cold_boot) {
|
||||
ret = aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -405,7 +405,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||
.get_tlbr_flush_limit = generic_tlbr_flush_limit,
|
||||
.get_tlb_num_entries = generic_tlb_num_entries,
|
||||
.timer_init = fdt_timer_init,
|
||||
.timer_exit = fdt_timer_exit,
|
||||
.vendor_ext_check = generic_vendor_ext_check,
|
||||
.vendor_ext_provider = generic_vendor_ext_provider,
|
||||
};
|
||||
|
@@ -159,17 +159,9 @@ static int k210_ipi_init(bool cold_boot)
|
||||
return aclint_mswi_warm_init();
|
||||
}
|
||||
|
||||
static int k210_timer_init(bool cold_boot)
|
||||
static int k210_timer_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (cold_boot) {
|
||||
rc = aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
const struct sbi_platform_operations platform_ops = {
|
||||
|
@@ -215,17 +215,9 @@ static int ux600_ipi_init(bool cold_boot)
|
||||
return aclint_mswi_warm_init();
|
||||
}
|
||||
|
||||
static int ux600_timer_init(bool cold_boot)
|
||||
static int ux600_timer_init(void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (cold_boot) {
|
||||
rc = aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
const struct sbi_platform_operations platform_ops = {
|
||||
|
@@ -116,20 +116,12 @@ static int platform_ipi_init(bool cold_boot)
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize platform timer for current HART.
|
||||
* Initialize platform timer during cold boot.
|
||||
*/
|
||||
static int platform_timer_init(bool cold_boot)
|
||||
static int platform_timer_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Example if the generic ACLINT driver is used */
|
||||
if (cold_boot) {
|
||||
ret = aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return aclint_mtimer_cold_init(&mtimer, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user