riscv: Avoid calling sbi_clear_ipi()
[oweals/u-boot.git] / arch / riscv / lib / sbi_ipi.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2019 Fraunhofer AISEC,
4  * Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5  */
6
7 #include <common.h>
8 #include <asm/encoding.h>
9 #include <asm/sbi.h>
10
11 int riscv_send_ipi(int hart)
12 {
13         ulong mask;
14
15         mask = 1UL << hart;
16         sbi_send_ipi(&mask);
17
18         return 0;
19 }
20
21 int riscv_clear_ipi(int hart)
22 {
23         csr_clear(CSR_SIP, SIP_SSIP);
24
25         return 0;
26 }
27
28 int riscv_get_ipi(int hart, int *pending)
29 {
30         /*
31          * The SBI does not support reading the IPI status. We always return 0
32          * to indicate that no IPI is pending.
33          */
34         *pending = 0;
35
36         return 0;
37 }