xref: /linux/drivers/char/tpm/tpm_crb_ffa.h (revision 4d40b59d8b0568769d10ac9b2a97e0af0a39d371)
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 
12 #if IS_REACHABLE(CONFIG_TCG_ARM_CRB_FFA)
13 int tpm_crb_ffa_init(void);
14 int tpm_crb_ffa_start(int request_type, int locality);
15 #else
tpm_crb_ffa_init(void)16 static inline int tpm_crb_ffa_init(void) { return 0; }
tpm_crb_ffa_start(int request_type,int locality)17 static inline int tpm_crb_ffa_start(int request_type, int locality) { return 0; }
18 #endif
19 
20 #define CRB_FFA_START_TYPE_COMMAND 0
21 #define CRB_FFA_START_TYPE_LOCALITY_REQUEST 1
22 
23 #endif
24