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_get_interface_version(u16 *major, u16 *minor);
15 int tpm_crb_ffa_start(int request_type, int locality);
16 #else
tpm_crb_ffa_init(void)17 static inline int tpm_crb_ffa_init(void) { return 0; }
tpm_crb_ffa_get_interface_version(u16 * major,u16 * minor)18 static inline int tpm_crb_ffa_get_interface_version(u16 *major, u16 *minor) { return 0; }
tpm_crb_ffa_start(int request_type,int locality)19 static inline int tpm_crb_ffa_start(int request_type, int locality) { return 0; }
20 #endif
21 
22 #define CRB_FFA_START_TYPE_COMMAND 0
23 #define CRB_FFA_START_TYPE_LOCALITY_REQUEST 1
24 
25 #endif
26