diff options
author | Samuel Holland <samuel.holland@sifive.com> | 2024-10-25 11:59:47 -0700 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2024-11-11 18:18:35 +0530 |
commit | 693afc818feecdbddb75f5c9ec4b436d56f64208 (patch) | |
tree | 912ef53be729c41fcfb4cc0a7eddccb1e61cddfc /lib/utils | |
parent | be9752a071475ae1d9e58a2dfcb8e83185fb7ae5 (diff) | |
download | opensbi-693afc818feecdbddb75f5c9ec4b436d56f64208.zip opensbi-693afc818feecdbddb75f5c9ec4b436d56f64208.tar.gz opensbi-693afc818feecdbddb75f5c9ec4b436d56f64208.tar.bz2 |
lib: sbi_ipi: Move initial IPI clear to sbi_ipi_init()
sbi_ipi_init() expects the platform warm init function to clear IPIs
on the local hart, but there is already a generic function to do this.
After this change, none of the existing drivers need a warm init
callback.
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils')
-rw-r--r-- | lib/utils/ipi/aclint_mswi.c | 8 | ||||
-rw-r--r-- | lib/utils/ipi/andes_plicsw.c | 8 | ||||
-rw-r--r-- | lib/utils/ipi/fdt_ipi_mswi.c | 2 | ||||
-rw-r--r-- | lib/utils/ipi/fdt_ipi_plicsw.c | 2 |
4 files changed, 2 insertions, 18 deletions
diff --git a/lib/utils/ipi/aclint_mswi.c b/lib/utils/ipi/aclint_mswi.c index 2cd7a53..9e55078 100644 --- a/lib/utils/ipi/aclint_mswi.c +++ b/lib/utils/ipi/aclint_mswi.c @@ -66,14 +66,6 @@ static struct sbi_ipi_device aclint_mswi = { .ipi_clear = mswi_ipi_clear }; -int aclint_mswi_warm_init(void) -{ - /* Clear IPI for current HART */ - mswi_ipi_clear(); - - return 0; -} - int aclint_mswi_cold_init(struct aclint_mswi_data *mswi) { u32 i; diff --git a/lib/utils/ipi/andes_plicsw.c b/lib/utils/ipi/andes_plicsw.c index 626699f..5d085d8 100644 --- a/lib/utils/ipi/andes_plicsw.c +++ b/lib/utils/ipi/andes_plicsw.c @@ -65,14 +65,6 @@ static struct sbi_ipi_device plicsw_ipi = { .ipi_clear = plicsw_ipi_clear }; -int plicsw_warm_ipi_init(void) -{ - /* Clear PLICSW IPI */ - plicsw_ipi_clear(); - - return 0; -} - int plicsw_cold_ipi_init(struct plicsw_data *plicsw) { int rc; diff --git a/lib/utils/ipi/fdt_ipi_mswi.c b/lib/utils/ipi/fdt_ipi_mswi.c index c78dead..0133197 100644 --- a/lib/utils/ipi/fdt_ipi_mswi.c +++ b/lib/utils/ipi/fdt_ipi_mswi.c @@ -64,6 +64,6 @@ static const struct fdt_match ipi_mswi_match[] = { struct fdt_ipi fdt_ipi_mswi = { .match_table = ipi_mswi_match, .cold_init = ipi_mswi_cold_init, - .warm_init = aclint_mswi_warm_init, + .warm_init = NULL, .exit = NULL, }; diff --git a/lib/utils/ipi/fdt_ipi_plicsw.c b/lib/utils/ipi/fdt_ipi_plicsw.c index 3288574..1fd6ba1 100644 --- a/lib/utils/ipi/fdt_ipi_plicsw.c +++ b/lib/utils/ipi/fdt_ipi_plicsw.c @@ -42,6 +42,6 @@ static const struct fdt_match ipi_plicsw_match[] = { struct fdt_ipi fdt_ipi_plicsw = { .match_table = ipi_plicsw_match, .cold_init = fdt_plicsw_cold_ipi_init, - .warm_init = plicsw_warm_ipi_init, + .warm_init = NULL, .exit = NULL, }; |