1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved.
12 * struct qce_device - crypto engine device structure
13 * @queue: crypto request queue
14 * @lock: the lock protects queue and req
15 * @done_tasklet: done tasklet object
16 * @req: current active request
17 * @result: result of current transform
18 * @base: virtual IO base
19 * @dev: pointer to device structure
20 * @core: core device clock
21 * @iface: interface clock
23 * @dma: pointer to dma data
24 * @burst_size: the crypto burst size
25 * @pipe_pair_id: which pipe pair id the device using
26 * @async_req_enqueue: invoked by every algorithm to enqueue a request
27 * @async_req_done: invoked by every algorithm to finish its request
30 struct crypto_queue queue
;
32 struct tasklet_struct done_tasklet
;
33 struct crypto_async_request
*req
;
37 struct clk
*core
, *iface
, *bus
;
38 struct qce_dma_data dma
;
40 unsigned int pipe_pair_id
;
41 int (*async_req_enqueue
)(struct qce_device
*qce
,
42 struct crypto_async_request
*req
);
43 void (*async_req_done
)(struct qce_device
*qce
, int ret
);
47 * struct qce_algo_ops - algorithm operations per crypto type
48 * @type: should be CRYPTO_ALG_TYPE_XXX
49 * @register_algs: invoked by core to register the algorithms
50 * @unregister_algs: invoked by core to unregister the algorithms
51 * @async_req_handle: invoked by core to handle enqueued request
55 int (*register_algs
)(struct qce_device
*qce
);
56 void (*unregister_algs
)(struct qce_device
*qce
);
57 int (*async_req_handle
)(struct crypto_async_request
*async_req
);