summaryrefslogtreecommitdiff
path: root/include/sbi
diff options
context:
space:
mode:
Diffstat (limited to 'include/sbi')
-rw-r--r--include/sbi/sbi_ipi.h18
-rw-r--r--include/sbi/sbi_platform.h30
2 files changed, 18 insertions, 30 deletions
diff --git a/include/sbi/sbi_ipi.h b/include/sbi/sbi_ipi.h
index 617872c..fb7d658 100644
--- a/include/sbi/sbi_ipi.h
+++ b/include/sbi/sbi_ipi.h
@@ -18,6 +18,18 @@
/* clang-format on */
+/** IPI hardware device */
+struct sbi_ipi_device {
+ /** Name of the IPI device */
+ char name[32];
+
+ /** Send IPI to a target HART */
+ void (*ipi_send)(u32 target_hart);
+
+ /** Clear IPI for a target HART */
+ void (*ipi_clear)(u32 target_hart);
+};
+
struct sbi_scratch;
/** IPI event operations or callbacks */
@@ -63,6 +75,12 @@ int sbi_ipi_send_halt(ulong hmask, ulong hbase);
void sbi_ipi_process(void);
+void sbi_ipi_raw_send(u32 target_hart);
+
+const struct sbi_ipi_device *sbi_ipi_get_device(void);
+
+void sbi_ipi_set_device(const struct sbi_ipi_device *dev);
+
int sbi_ipi_init(struct sbi_scratch *scratch, bool cold_boot);
void sbi_ipi_exit(struct sbi_scratch *scratch);
diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h
index a2084c1..2756d73 100644
--- a/include/sbi/sbi_platform.h
+++ b/include/sbi/sbi_platform.h
@@ -101,10 +101,6 @@ struct sbi_platform_operations {
/** Exit the platform interrupt controller for current HART */
void (*irqchip_exit)(void);
- /** Send IPI to a target HART */
- void (*ipi_send)(u32 target_hart);
- /** Clear IPI for a target HART */
- void (*ipi_clear)(u32 target_hart);
/** Initialize IPI for current HART */
int (*ipi_init)(bool cold_boot);
/** Exit IPI for current HART */
@@ -523,32 +519,6 @@ static inline void sbi_platform_irqchip_exit(const struct sbi_platform *plat)
}
/**
- * Send IPI to a target HART
- *
- * @param plat pointer to struct sbi_platform
- * @param target_hart HART ID of IPI target
- */
-static inline void sbi_platform_ipi_send(const struct sbi_platform *plat,
- u32 target_hart)
-{
- if (plat && sbi_platform_ops(plat)->ipi_send)
- sbi_platform_ops(plat)->ipi_send(target_hart);
-}
-
-/**
- * Clear IPI for a target HART
- *
- * @param plat pointer to struct sbi_platform
- * @param target_hart HART ID of IPI target
- */
-static inline void sbi_platform_ipi_clear(const struct sbi_platform *plat,
- u32 target_hart)
-{
- if (plat && sbi_platform_ops(plat)->ipi_clear)
- sbi_platform_ops(plat)->ipi_clear(target_hart);
-}
-
-/**
* Initialize the platform IPI support for current HART
*
* @param plat pointer to struct sbi_platform