sh_eth: fix EESIPR values for SH77{34|63}
[linux/fpc-iii.git] / drivers / crypto / caam / caamalg_desc.h
blob95551737333a1800048425f8b657cad2f88f03a8
1 /*
2 * Shared descriptors for aead, ablkcipher algorithms
4 * Copyright 2016 NXP
5 */
7 #ifndef _CAAMALG_DESC_H_
8 #define _CAAMALG_DESC_H_
10 /* length of descriptors text */
11 #define DESC_AEAD_BASE (4 * CAAM_CMD_SZ)
12 #define DESC_AEAD_ENC_LEN (DESC_AEAD_BASE + 11 * CAAM_CMD_SZ)
13 #define DESC_AEAD_DEC_LEN (DESC_AEAD_BASE + 15 * CAAM_CMD_SZ)
14 #define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 7 * CAAM_CMD_SZ)
16 /* Note: Nonce is counted in cdata.keylen */
17 #define DESC_AEAD_CTR_RFC3686_LEN (4 * CAAM_CMD_SZ)
19 #define DESC_AEAD_NULL_BASE (3 * CAAM_CMD_SZ)
20 #define DESC_AEAD_NULL_ENC_LEN (DESC_AEAD_NULL_BASE + 11 * CAAM_CMD_SZ)
21 #define DESC_AEAD_NULL_DEC_LEN (DESC_AEAD_NULL_BASE + 13 * CAAM_CMD_SZ)
23 #define DESC_GCM_BASE (3 * CAAM_CMD_SZ)
24 #define DESC_GCM_ENC_LEN (DESC_GCM_BASE + 16 * CAAM_CMD_SZ)
25 #define DESC_GCM_DEC_LEN (DESC_GCM_BASE + 12 * CAAM_CMD_SZ)
27 #define DESC_RFC4106_BASE (3 * CAAM_CMD_SZ)
28 #define DESC_RFC4106_ENC_LEN (DESC_RFC4106_BASE + 13 * CAAM_CMD_SZ)
29 #define DESC_RFC4106_DEC_LEN (DESC_RFC4106_BASE + 13 * CAAM_CMD_SZ)
31 #define DESC_RFC4543_BASE (3 * CAAM_CMD_SZ)
32 #define DESC_RFC4543_ENC_LEN (DESC_RFC4543_BASE + 11 * CAAM_CMD_SZ)
33 #define DESC_RFC4543_DEC_LEN (DESC_RFC4543_BASE + 12 * CAAM_CMD_SZ)
35 #define DESC_ABLKCIPHER_BASE (3 * CAAM_CMD_SZ)
36 #define DESC_ABLKCIPHER_ENC_LEN (DESC_ABLKCIPHER_BASE + \
37 20 * CAAM_CMD_SZ)
38 #define DESC_ABLKCIPHER_DEC_LEN (DESC_ABLKCIPHER_BASE + \
39 15 * CAAM_CMD_SZ)
41 void cnstr_shdsc_aead_null_encap(u32 * const desc, struct alginfo *adata,
42 unsigned int icvsize);
44 void cnstr_shdsc_aead_null_decap(u32 * const desc, struct alginfo *adata,
45 unsigned int icvsize);
47 void cnstr_shdsc_aead_encap(u32 * const desc, struct alginfo *cdata,
48 struct alginfo *adata, unsigned int icvsize,
49 const bool is_rfc3686, u32 *nonce,
50 const u32 ctx1_iv_off);
52 void cnstr_shdsc_aead_decap(u32 * const desc, struct alginfo *cdata,
53 struct alginfo *adata, unsigned int ivsize,
54 unsigned int icvsize, const bool geniv,
55 const bool is_rfc3686, u32 *nonce,
56 const u32 ctx1_iv_off);
58 void cnstr_shdsc_aead_givencap(u32 * const desc, struct alginfo *cdata,
59 struct alginfo *adata, unsigned int ivsize,
60 unsigned int icvsize, const bool is_rfc3686,
61 u32 *nonce, const u32 ctx1_iv_off);
63 void cnstr_shdsc_gcm_encap(u32 * const desc, struct alginfo *cdata,
64 unsigned int icvsize);
66 void cnstr_shdsc_gcm_decap(u32 * const desc, struct alginfo *cdata,
67 unsigned int icvsize);
69 void cnstr_shdsc_rfc4106_encap(u32 * const desc, struct alginfo *cdata,
70 unsigned int icvsize);
72 void cnstr_shdsc_rfc4106_decap(u32 * const desc, struct alginfo *cdata,
73 unsigned int icvsize);
75 void cnstr_shdsc_rfc4543_encap(u32 * const desc, struct alginfo *cdata,
76 unsigned int icvsize);
78 void cnstr_shdsc_rfc4543_decap(u32 * const desc, struct alginfo *cdata,
79 unsigned int icvsize);
81 void cnstr_shdsc_ablkcipher_encap(u32 * const desc, struct alginfo *cdata,
82 unsigned int ivsize, const bool is_rfc3686,
83 const u32 ctx1_iv_off);
85 void cnstr_shdsc_ablkcipher_decap(u32 * const desc, struct alginfo *cdata,
86 unsigned int ivsize, const bool is_rfc3686,
87 const u32 ctx1_iv_off);
89 void cnstr_shdsc_ablkcipher_givencap(u32 * const desc, struct alginfo *cdata,
90 unsigned int ivsize, const bool is_rfc3686,
91 const u32 ctx1_iv_off);
93 void cnstr_shdsc_xts_ablkcipher_encap(u32 * const desc, struct alginfo *cdata);
95 void cnstr_shdsc_xts_ablkcipher_decap(u32 * const desc, struct alginfo *cdata);
97 #endif /* _CAAMALG_DESC_H_ */