common.h (3bbfe9871005f38df2955b2e125933edf1d2feef) common.h (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
12typedef struct arm_smccc_1_2_regs ffa_value_t;
13
14typedef void (ffa_fn)(ffa_value_t, ffa_value_t *);
15
16int arm_ffa_bus_init(void);
17void arm_ffa_bus_exit(void);
18
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
12typedef struct arm_smccc_1_2_regs ffa_value_t;
13
14typedef void (ffa_fn)(ffa_value_t, ffa_value_t *);
15
16int arm_ffa_bus_init(void);
17void arm_ffa_bus_exit(void);
18
19#ifdef CONFIG_ARM_FFA_SMCCC
20int __init ffa_transport_init(ffa_fn **invoke_ffa_fn);
21#else
19static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
20{
21 return -EOPNOTSUPP;
22}
22static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
23{
24 return -EOPNOTSUPP;
25}
26#endif
23
24#endif /* _FFA_COMMON_H */
27
28#endif /* _FFA_COMMON_H */