xref: /openbmc/linux/drivers/firmware/arm_ffa/common.h (revision 714be77e976a4b013b935b3223b2ef68856084d0)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2021 ARM Ltd.
4  */
5 
6 #ifndef _FFA_COMMON_H
7 #define _FFA_COMMON_H
8 
9 #include <linux/arm-smccc.h>
10 #include <linux/err.h>
11 
12 typedef struct arm_smccc_1_2_regs ffa_value_t;
13 
14 typedef void (ffa_fn)(ffa_value_t, ffa_value_t *);
15 
16 int arm_ffa_bus_init(void);
17 void arm_ffa_bus_exit(void);
18 
19 #ifdef CONFIG_ARM_FFA_SMCCC
20 int __init ffa_transport_init(ffa_fn **invoke_ffa_fn);
21 #else
22 static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
23 {
24 	return -EOPNOTSUPP;
25 }
26 #endif
27 
28 #endif /* _FFA_COMMON_H */
29