Merge branch 'drm-next-5.1' of git://people.freedesktop.org/~agd5f/linux into drm...
[linux-2.6-block.git] / drivers / crypto / ccree / cc_cipher.h
CommitLineData
63ee04c8
GBY
1/* SPDX-License-Identifier: GPL-2.0 */
2/* Copyright (C) 2012-2018 ARM Limited or its affiliates. */
3
4/* \file cc_cipher.h
5 * ARM CryptoCell Cipher Crypto API
6 */
7
8#ifndef __CC_CIPHER_H__
9#define __CC_CIPHER_H__
10
11#include <linux/kernel.h>
12#include <crypto/algapi.h>
13#include "cc_driver.h"
14#include "cc_buffer_mgr.h"
15
63ee04c8
GBY
16struct cipher_req_ctx {
17 struct async_gen_req_ctx gen_ctx;
18 enum cc_req_dma_buf_type dma_buf_type;
19 u32 in_nents;
20 u32 in_mlli_nents;
21 u32 out_nents;
22 u32 out_mlli_nents;
23 u8 *backup_info; /*store iv for generated IV flow*/
24 u8 *iv;
63ee04c8
GBY
25 struct mlli_params mlli_params;
26};
27
28int cc_cipher_alloc(struct cc_drvdata *drvdata);
29
30int cc_cipher_free(struct cc_drvdata *drvdata);
31
a794d8d8
GBY
32struct cc_hkey_info {
33 u16 keylen;
34 u8 hw_key1;
35 u8 hw_key2;
36} __packed;
63ee04c8 37
a794d8d8 38#define CC_HW_KEY_SIZE sizeof(struct cc_hkey_info)
63ee04c8
GBY
39
40#endif /*__CC_CIPHER_H__*/