forked from Mirrors/opensbi
platform: Drop IPI warm init and exit hooks
Now that the SBI IPI core clears IPIs at warm boot in a generic way, none of the drivers or platforms use these hooks, and we can remove them. Platforms need only to initialize the driver once during cold init. If other hooks are needed in the future, they can be added to struct sbi_ipi_device. 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
693afc818f
commit
86d2c1797a
@@ -16,22 +16,7 @@
|
||||
extern struct fdt_ipi *fdt_ipi_drivers[];
|
||||
extern unsigned long fdt_ipi_drivers_size;
|
||||
|
||||
static struct fdt_ipi *current_driver = NULL;
|
||||
|
||||
void fdt_ipi_exit(void)
|
||||
{
|
||||
if (current_driver && current_driver->exit)
|
||||
current_driver->exit();
|
||||
}
|
||||
|
||||
static int fdt_ipi_warm_init(void)
|
||||
{
|
||||
if (current_driver && current_driver->warm_init)
|
||||
return current_driver->warm_init();
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fdt_ipi_cold_init(void)
|
||||
int fdt_ipi_init(void)
|
||||
{
|
||||
int pos, noff, rc;
|
||||
struct fdt_ipi *drv;
|
||||
@@ -56,7 +41,6 @@ static int fdt_ipi_cold_init(void)
|
||||
continue;
|
||||
if (rc)
|
||||
return rc;
|
||||
current_driver = drv;
|
||||
|
||||
/*
|
||||
* We will have multiple IPI devices on multi-die or
|
||||
@@ -71,16 +55,3 @@ static int fdt_ipi_cold_init(void)
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
|
||||
int fdt_ipi_init(bool cold_boot)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (cold_boot) {
|
||||
rc = fdt_ipi_cold_init();
|
||||
if (rc)
|
||||
return rc;
|
||||
}
|
||||
|
||||
return fdt_ipi_warm_init();
|
||||
}
|
||||
|
Reference in New Issue
Block a user