aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2024-09-02 21:06:50 -0700
committerAnup Patel <anup@brainfault.org>2024-11-05 17:39:31 +0530
commit99b01ab610acf6ff7c3d0199f13f5b41322a22e2 (patch)
tree7472232fdd08fec61c0c644b802fb8fa3ad06cde /platform
parent450082874346bb25109877b7ac6a1754f089f538 (diff)
downloadopensbi-99b01ab610acf6ff7c3d0199f13f5b41322a22e2.zip
opensbi-99b01ab610acf6ff7c3d0199f13f5b41322a22e2.tar.gz
opensbi-99b01ab610acf6ff7c3d0199f13f5b41322a22e2.tar.bz2
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>
Diffstat (limited to 'platform')
-rw-r--r--platform/fpga/ariane/platform.c14
-rw-r--r--platform/fpga/openpiton/platform.c14
-rw-r--r--platform/generic/platform.c1
-rw-r--r--platform/kendryte/k210/platform.c12
-rw-r--r--platform/nuclei/ux600/platform.c12
-rw-r--r--platform/template/platform.c14
6 files changed, 13 insertions, 54 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c
index c895cb4..dfe170f 100644
--- a/platform/fpga/ariane/platform.c
+++ b/platform/fpga/ariane/platform.c
@@ -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);
}
/*
diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c
index ea0a479..2bfc15c 100644
--- a/platform/fpga/openpiton/platform.c
+++ b/platform/fpga/openpiton/platform.c
@@ -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);
}
/*
diff --git a/platform/generic/platform.c b/platform/generic/platform.c
index 49d877d..921c494 100644
--- a/platform/generic/platform.c
+++ b/platform/generic/platform.c
@@ -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,
};
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c
index 82dd080..06b7eb7 100644
--- a/platform/kendryte/k210/platform.c
+++ b/platform/kendryte/k210/platform.c
@@ -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 = {
diff --git a/platform/nuclei/ux600/platform.c b/platform/nuclei/ux600/platform.c
index b17c1df..d4f309a 100644
--- a/platform/nuclei/ux600/platform.c
+++ b/platform/nuclei/ux600/platform.c
@@ -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 = {
diff --git a/platform/template/platform.c b/platform/template/platform.c
index 1238a8d..1fc7b7b 100644
--- a/platform/template/platform.c
+++ b/platform/template/platform.c
@@ -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);
}
/*