blob: 9a698ce74e67127209c46cec82fbee9e2e907f19 [file] [log] [blame]
Lukas Auere79178b2019-03-17 19:28:34 +01001// 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/sbi.h>
9
10int riscv_send_ipi(int hart)
11{
12 ulong mask;
13
14 mask = 1UL << hart;
15 sbi_send_ipi(&mask);
16
17 return 0;
18}
19
20int riscv_clear_ipi(int hart)
21{
22 sbi_clear_ipi();
23
24 return 0;
25}
Lukas Auerc7460b82019-12-08 23:28:50 +010026
27int riscv_get_ipi(int hart, int *pending)
28{
29 /*
30 * The SBI does not support reading the IPI status. We always return 0
31 * to indicate that no IPI is pending.
32 */
33 *pending = 0;
34
35 return 0;
36}