Merge branch 'next' of git://git.denx.de/u-boot-usb into next
[oweals/u-boot.git] / arch / riscv / lib / sbi_ipi.c
index 170346da68c23feca6c55506276720a3c386f795..abafca9e5c1366d18608272f328d1cc79560dd02 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <common.h>
+#include <asm/encoding.h>
 #include <asm/sbi.h>
 
 int riscv_send_ipi(int hart)
@@ -19,7 +20,18 @@ int riscv_send_ipi(int hart)
 
 int riscv_clear_ipi(int hart)
 {
-       sbi_clear_ipi();
+       csr_clear(CSR_SIP, SIP_SSIP);
+
+       return 0;
+}
+
+int riscv_get_ipi(int hart, int *pending)
+{
+       /*
+        * The SBI does not support reading the IPI status. We always return 0
+        * to indicate that no IPI is pending.
+        */
+       *pending = 0;
 
        return 0;
 }