0001
0002
0003
0004
0005
0006
0007
0008 #ifndef __CC_CIPHER_H__
0009 #define __CC_CIPHER_H__
0010
0011 #include <linux/kernel.h>
0012 #include <crypto/algapi.h>
0013 #include "cc_driver.h"
0014 #include "cc_buffer_mgr.h"
0015
0016 struct cipher_req_ctx {
0017 struct async_gen_req_ctx gen_ctx;
0018 enum cc_req_dma_buf_type dma_buf_type;
0019 u32 in_nents;
0020 u32 in_mlli_nents;
0021 u32 out_nents;
0022 u32 out_mlli_nents;
0023 u8 *iv;
0024 struct mlli_params mlli_params;
0025 };
0026
0027 int cc_cipher_alloc(struct cc_drvdata *drvdata);
0028
0029 int cc_cipher_free(struct cc_drvdata *drvdata);
0030
0031 struct cc_hkey_info {
0032 u16 keylen;
0033 u8 hw_key1;
0034 u8 hw_key2;
0035 } __packed;
0036
0037 #define CC_HW_KEY_SIZE sizeof(struct cc_hkey_info)
0038
0039 #endif