diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-04-24 14:23:32 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-01 07:28:01 +0300 |
commit | 76f0f814075338970c7e7914ab94644e855632f7 (patch) | |
tree | 8d8b1e4206618a1e50ef872a2308f2981932693d /include | |
parent | 8ff2b94ea16ccd361cb1821390fffde1e7ff7a5d (diff) | |
download | opensbi-76f0f814075338970c7e7914ab94644e855632f7.tar.xz |
lib: utils: Add simple FDT ipi framework
We add simple ipi framework which will select and use ipi driver
based on details in FDT passed by previous booting stage.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sbi_utils/ipi/fdt_ipi.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/sbi_utils/ipi/fdt_ipi.h b/include/sbi_utils/ipi/fdt_ipi.h new file mode 100644 index 0000000..e817141 --- /dev/null +++ b/include/sbi_utils/ipi/fdt_ipi.h @@ -0,0 +1,32 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2020 Western Digital Corporation or its affiliates. + * + * Authors: + * Anup Patel <anup.patel@wdc.com> + */ + +#ifndef __FDT_IPI_H__ +#define __FDT_IPI_H__ + +#include <sbi/sbi_types.h> + +struct fdt_ipi { + const struct fdt_match *match_table; + int (*cold_init)(void *fdt, int nodeoff, const struct fdt_match *match); + int (*warm_init)(void); + void (*exit)(void); + void (*send)(u32 target_hart); + void (*clear)(u32 target_hart); +}; + +void fdt_ipi_send(u32 target_hart); + +void fdt_ipi_clear(u32 target_hart); + +void fdt_ipi_exit(void); + +int fdt_ipi_init(bool cold_boot); + +#endif |