common.h 708 B

12345678910111213141516171819202122232425262728293031
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2021 ARM Ltd.
  4. */
  5. #ifndef _FFA_COMMON_H
  6. #define _FFA_COMMON_H
  7. #include <linux/arm_ffa.h>
  8. #include <linux/arm-smccc.h>
  9. #include <linux/err.h>
  10. typedef struct arm_smccc_1_2_regs ffa_value_t;
  11. typedef void (ffa_fn)(ffa_value_t, ffa_value_t *);
  12. int arm_ffa_bus_init(void);
  13. void arm_ffa_bus_exit(void);
  14. bool ffa_device_is_valid(struct ffa_device *ffa_dev);
  15. void ffa_device_match_uuid(struct ffa_device *ffa_dev, const uuid_t *uuid);
  16. #ifdef CONFIG_ARM_FFA_SMCCC
  17. int __init ffa_transport_init(ffa_fn **invoke_ffa_fn);
  18. #else
  19. static inline int __init ffa_transport_init(ffa_fn **invoke_ffa_fn)
  20. {
  21. return -EOPNOTSUPP;
  22. }
  23. #endif
  24. #endif /* _FFA_COMMON_H */