[uboot] create uboot from github:
repo: https://github.com/u-boot/u-boot commit: d80bb749fab53da72c4a0e09b8c2d2aaa3103c91 Change-Id: Ie6434426e1ec15bc08bb1832798e371f3fd5fb29
This commit is contained in:
42
u-boot-2021.10/arch/riscv/lib/sbi_ipi.c
Normal file
42
u-boot-2021.10/arch/riscv/lib/sbi_ipi.c
Normal file
@ -0,0 +1,42 @@
|
||||
// SPDX-License-Identifier: GPL-2.0+
|
||||
/*
|
||||
* Copyright (C) 2019 Fraunhofer AISEC,
|
||||
* Lukas Auer <lukas.auer@aisec.fraunhofer.de>
|
||||
*/
|
||||
|
||||
#include <common.h>
|
||||
#include <asm/encoding.h>
|
||||
#include <asm/sbi.h>
|
||||
|
||||
int riscv_init_ipi(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int riscv_send_ipi(int hart)
|
||||
{
|
||||
ulong mask;
|
||||
|
||||
mask = 1UL << hart;
|
||||
sbi_send_ipi(&mask);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int riscv_clear_ipi(int hart)
|
||||
{
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user