qcom_scm_hab.h 712 B

1234567891011121314151617181920212223242526272829303132
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #ifndef __QCOM_SCM_HAB_H_
  6. #define __QCOM_SCM_HAB_H_
  7. #if IS_ENABLED(CONFIG_QCOM_SCM_HAB)
  8. int scm_qcpe_hab_open(void);
  9. void scm_qcpe_hab_close(void);
  10. int scm_call_qcpe(const struct arm_smccc_args *smc,
  11. struct arm_smccc_res *res, const bool atomic);
  12. #else
  13. static inline int scm_qcpe_hab_open(void)
  14. {
  15. return -EOPNOTSUPP;
  16. }
  17. static inline void scm_qcpe_hab_close(void)
  18. {
  19. }
  20. static inline int scm_call_qcpe(const struct arm_smccc_args *smc,
  21. struct arm_smccc_res *res, const bool atomic)
  22. {
  23. return -EOPNOTSUPP;
  24. }
  25. #endif /* CONFIG_QCOM_SCM_HAB */
  26. #endif /* __QCOM_SCM_HAB_H_ */