2 * Copyright (C) 2012-2017 ARM Limited or its affiliates.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, see <http://www.gnu.org/licenses/>.
17 #ifndef __SSI_FIPS_H__
18 #define __SSI_FIPS_H__
20 #ifdef CONFIG_CRYPTO_FIPS
23 CC_FIPS_SYNC_MODULE_OK = 0x0,
24 CC_FIPS_SYNC_MODULE_ERROR = 0x1,
25 CC_FIPS_SYNC_REE_STATUS = 0x4,
26 CC_FIPS_SYNC_TEE_STATUS = 0x8,
27 CC_FIPS_SYNC_STATUS_RESERVE32B = S32_MAX
30 int ssi_fips_init(struct ssi_drvdata *p_drvdata);
31 void ssi_fips_fini(struct ssi_drvdata *drvdata);
32 void fips_handler(struct ssi_drvdata *drvdata);
33 void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok);
35 #else /* CONFIG_CRYPTO_FIPS */
37 static inline int ssi_fips_init(struct ssi_drvdata *p_drvdata)
42 static inline void ssi_fips_fini(struct ssi_drvdata *drvdata) {}
43 void cc_set_ree_fips_status(struct ssi_drvdata *drvdata, bool ok) {}
44 void fips_handler(struct ssi_drvdata *drvdata) {}
46 #endif /* CONFIG_CRYPTO_FIPS */
48 #endif /*__SSI_FIPS_H__*/