summaryrefslogtreecommitdiff
path: root/arch/riscv/lib/sbi_ipi.c
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-06-24 06:41:18 -0400
committerAndes <uboot@andestech.com>2020-07-01 15:01:22 +0800
commit40686c394e533fec765fe237936e353c84e73fff (patch)
tree10bb96dd905e11d36f6e8f81806f167b5b66676a /arch/riscv/lib/sbi_ipi.c
parent9472630337e7c4ac442066b5a752aaa8c3b4d4a6 (diff)
downloadu-boot-40686c394e533fec765fe237936e353c84e73fff.tar.gz
u-boot-40686c394e533fec765fe237936e353c84e73fff.tar.bz2
u-boot-40686c394e533fec765fe237936e353c84e73fff.zip
riscv: Clean up IPI initialization code
The previous IPI code initialized the device whenever the first call was made to a riscv_*_ipi function. This made it difficult to determine when the IPI device was initialized. This patch introduces a new function riscv_init_ipi. It is called once during arch_cpu_init_dm. In SPL, it is called in spl_invoke_opensbi. Before this point, no riscv_*_ipi functions should be called. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Rick Chen <rick@andestech.com>
Diffstat (limited to 'arch/riscv/lib/sbi_ipi.c')
-rw-r--r--arch/riscv/lib/sbi_ipi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/riscv/lib/sbi_ipi.c b/arch/riscv/lib/sbi_ipi.c
index abafca9e5c..d02e2b4c48 100644
--- a/arch/riscv/lib/sbi_ipi.c
+++ b/arch/riscv/lib/sbi_ipi.c
@@ -8,6 +8,11 @@
#include <asm/encoding.h>
#include <asm/sbi.h>
+int riscv_init_ipi(void)
+{
+ return 0;
+}
+
int riscv_send_ipi(int hart)
{
ulong mask;