1 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ 2 /* 3 * Shared descriptors for ahash algorithms 4 * 5 * Copyright 2017 NXP 6 */ 7 8 #ifndef _CAAMHASH_DESC_H_ 9 #define _CAAMHASH_DESC_H_ 10 11 /* length of descriptors text */ 12 #define DESC_AHASH_BASE (3 * CAAM_CMD_SZ) 13 #define DESC_AHASH_UPDATE_LEN (6 * CAAM_CMD_SZ) 14 #define DESC_AHASH_UPDATE_FIRST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ) 15 #define DESC_AHASH_FINAL_LEN (DESC_AHASH_BASE + 5 * CAAM_CMD_SZ) 16 #define DESC_AHASH_DIGEST_LEN (DESC_AHASH_BASE + 4 * CAAM_CMD_SZ) 17 18 void cnstr_shdsc_ahash(u32 * const desc, struct alginfo *adata, u32 state, 19 int digestsize, int ctx_len, bool import_ctx, int era); 20 21 #endif /* _CAAMHASH_DESC_H_ */ 22