lib: sbi: Simplify ipi platform operations

Instead of having ipi_send() and ipi_clear() callbacks in
platform operations, it will be much simpler for ipi driver
to directly register these operations as a device to sbi_ipi
implementation.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
Anup Patel
2021-04-22 10:27:15 +05:30
committed by Anup Patel
parent 559a8f1d3b
commit dc39c7b630
18 changed files with 72 additions and 109 deletions

View File

@@ -17,35 +17,15 @@ static struct fdt_ipi *ipi_drivers[] = {
&fdt_ipi_clint
};
static void dummy_send(u32 target_hart)
{
}
static void dummy_clear(u32 target_hart)
{
}
static struct fdt_ipi dummy = {
.match_table = NULL,
.cold_init = NULL,
.warm_init = NULL,
.exit = NULL,
.send = dummy_send,
.clear = dummy_clear
};
static struct fdt_ipi *current_driver = &dummy;
void fdt_ipi_send(u32 target_hart)
{
current_driver->send(target_hart);
}
void fdt_ipi_clear(u32 target_hart)
{
current_driver->clear(target_hart);
}
void fdt_ipi_exit(void)
{
if (current_driver->exit)