brintos

brintos / linux-shallow public Read only

0
0
Text · 1.1 KiB · fc33eeb Raw
39 lines · c
1/* SPDX-License-Identifier: GPL-2.0 */2/* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */3 4#ifndef __CC_FIPS_H__5#define __CC_FIPS_H__6 7#ifdef CONFIG_CRYPTO_FIPS8 9enum cc_fips_status {10	CC_FIPS_SYNC_MODULE_OK = 0x0,11	CC_FIPS_SYNC_MODULE_ERROR = 0x1,12	CC_FIPS_SYNC_REE_STATUS = 0x4,13	CC_FIPS_SYNC_TEE_STATUS = 0x8,14	CC_FIPS_SYNC_STATUS_RESERVE32B = S32_MAX15};16 17int cc_fips_init(struct cc_drvdata *p_drvdata);18void cc_fips_fini(struct cc_drvdata *drvdata);19void fips_handler(struct cc_drvdata *drvdata);20void cc_set_ree_fips_status(struct cc_drvdata *drvdata, bool ok);21void cc_tee_handle_fips_error(struct cc_drvdata *p_drvdata);22 23#else  /* CONFIG_CRYPTO_FIPS */24 25static inline int cc_fips_init(struct cc_drvdata *p_drvdata)26{27	return 0;28}29 30static inline void cc_fips_fini(struct cc_drvdata *drvdata) {}31static inline void cc_set_ree_fips_status(struct cc_drvdata *drvdata,32					  bool ok) {}33static inline void fips_handler(struct cc_drvdata *drvdata) {}34static inline void cc_tee_handle_fips_error(struct cc_drvdata *p_drvdata) {}35 36#endif /* CONFIG_CRYPTO_FIPS */37 38#endif  /*__CC_FIPS_H__*/39