Sudeep Holla | 3bbfe98 | 2021-05-21 16:10:30 +0100 | [diff] [blame] | 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 | |
Sudeep Holla | d0c0bce8 | 2021-05-21 16:10:32 +0100 | [diff] [blame] | 9 | #include <linux/arm_ffa.h> |
Sudeep Holla | 3bbfe98 | 2021-05-21 16:10:30 +0100 | [diff] [blame] | 10 | #include <linux/arm-smccc.h> |
| 11 | #include <linux/err.h> |
| 12 | |
| 13 | typedef struct arm_smccc_1_2_regs ffa_value_t; |
| 14 | |
| 15 | typedef void (ffa_fn)(ffa_value_t, ffa_value_t *); |
| 16 | |
| 17 | int arm_ffa_bus_init(void); |
| 18 | void arm_ffa_bus_exit(void); |
Sudeep Holla | d0c0bce8 | 2021-05-21 16:10:32 +0100 | [diff] [blame] | 19 | bool ffa_device_is_valid(struct ffa_device *ffa_dev); |
| 20 | void ffa_device_match_uuid(struct ffa_device *ffa_dev, const uuid_t *uuid); |
Sudeep Holla | 3bbfe98 | 2021-05-21 16:10:30 +0100 | [diff] [blame] | 21 | |
Sudeep Holla | 714be77 | 2021-05-21 16:10:31 +0100 | [diff] [blame] | 22 | #ifdef CONFIG_ARM_FFA_SMCCC |
| 23 | int __init ffa_transport_init(ffa_fn **invoke_ffa_fn); |
| 24 | #else |
Sudeep Holla | 3bbfe98 | 2021-05-21 16:10:30 +0100 | [diff] [blame] | 25 | static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn) |
| 26 | { |
| 27 | return -EOPNOTSUPP; |
| 28 | } |
Sudeep Holla | 714be77 | 2021-05-21 16:10:31 +0100 | [diff] [blame] | 29 | #endif |
Sudeep Holla | 3bbfe98 | 2021-05-21 16:10:30 +0100 | [diff] [blame] | 30 | |
| 31 | #endif /* _FFA_COMMON_H */ |