1 /* SPDX-License-Identifier: BSD-2-Clause */
2 /*
3  * Copyright 2018-2021 NXP
4  *
5  * Brief   CAAM Hash manager header.
6  */
7 #ifndef __CAAM_HASH_H__
8 #define __CAAM_HASH_H__
9 
10 #include <caam_jr.h>
11 
12 #ifdef CFG_NXP_CAAM_HASH_DRV
13 /*
14  * Initialize the Hash module
15  *
16  * @caam_jrcfg	JR configuration structure
17  */
18 enum caam_status caam_hash_init(struct caam_jrcfg *caam_jrcfg);
19 #else
20 static inline enum caam_status
caam_hash_init(struct caam_jrcfg * caam_jrcfg __unused)21 caam_hash_init(struct caam_jrcfg *caam_jrcfg __unused)
22 {
23 	return CAAM_NO_ERROR;
24 }
25 #endif /* CFG_NXP_CAAM_HASH_DRV */
26 
27 #ifdef CFG_NXP_CAAM_HMAC_DRV
28 /*
29  * Initialize the HMAC module
30  *
31  * @caam_jrcfg	JR configuration structure
32  */
33 enum caam_status caam_hmac_init(struct caam_jrcfg *caam_jrcfg);
34 #else
35 static inline enum caam_status
caam_hmac_init(struct caam_jrcfg * caam_jrcfg __unused)36 caam_hmac_init(struct caam_jrcfg *caam_jrcfg __unused)
37 {
38 	return CAAM_NO_ERROR;
39 }
40 #endif /* CFG_NXP_CAAM_HMAC_DRV */
41 #endif /* __CAAM_HASH_H__ */
42