staging: rtl8188eu: rename HalSetBrateCfg() - style
[linux/fpc-iii.git] / drivers / crypto / ccree / cc_ivgen.h
blobb6ac16903ddab7bc2b37d6f37b22b784308d32fc
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2012-2018 ARM Limited or its affiliates. */
4 #ifndef __CC_IVGEN_H__
5 #define __CC_IVGEN_H__
7 #include "cc_hw_queue_defs.h"
9 #define CC_IVPOOL_SEQ_LEN 8
11 /*!
12 * Allocates iv-pool and maps resources.
13 * This function generates the first IV pool.
15 * \param drvdata Driver's private context
17 * \return int Zero for success, negative value otherwise.
19 int cc_ivgen_init(struct cc_drvdata *drvdata);
21 /*!
22 * Free iv-pool and ivgen context.
24 * \param drvdata
26 void cc_ivgen_fini(struct cc_drvdata *drvdata);
28 /*!
29 * Generates the initial pool in SRAM.
30 * This function should be invoked when resuming DX driver.
32 * \param drvdata
34 * \return int Zero for success, negative value otherwise.
36 int cc_init_iv_sram(struct cc_drvdata *drvdata);
38 /*!
39 * Acquires 16 Bytes IV from the iv-pool
41 * \param drvdata Driver private context
42 * \param iv_out_dma Array of physical IV out addresses
43 * \param iv_out_dma_len Length of iv_out_dma array (additional elements of
44 * iv_out_dma array are ignore)
45 * \param iv_out_size May be 8 or 16 bytes long
46 * \param iv_seq IN/OUT array to the descriptors sequence
47 * \param iv_seq_len IN/OUT pointer to the sequence length
49 * \return int Zero for success, negative value otherwise.
51 int cc_get_iv(struct cc_drvdata *drvdata, dma_addr_t iv_out_dma[],
52 unsigned int iv_out_dma_len, unsigned int iv_out_size,
53 struct cc_hw_desc iv_seq[], unsigned int *iv_seq_len);
55 #endif /*__CC_IVGEN_H__*/