tpm_crb_ffa.h 647 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (C) 2024 Arm Ltd.
  4. *
  5. * This device driver implements the TPM CRB start method
  6. * as defined in the TPM Service Command Response Buffer
  7. * Interface Over FF-A (DEN0138).
  8. */
  9. #ifndef _TPM_CRB_FFA_H
  10. #define _TPM_CRB_FFA_H
  11. #if IS_REACHABLE(CONFIG_TCG_ARM_CRB_FFA)
  12. int tpm_crb_ffa_init(void);
  13. int tpm_crb_ffa_start(int request_type, int locality);
  14. #else
  15. static inline int tpm_crb_ffa_init(void) { return 0; }
  16. static inline int tpm_crb_ffa_start(int request_type, int locality) { return 0; }
  17. #endif
  18. #define CRB_FFA_START_TYPE_COMMAND 0
  19. #define CRB_FFA_START_TYPE_LOCALITY_REQUEST 1
  20. #endif