![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0-only */ 0002 /* 0003 * Copyright (c) 2010-2014, The Linux Foundation. All rights reserved. 0004 */ 0005 0006 #ifndef _CORE_H_ 0007 #define _CORE_H_ 0008 0009 #include "dma.h" 0010 0011 /** 0012 * struct qce_device - crypto engine device structure 0013 * @queue: crypto request queue 0014 * @lock: the lock protects queue and req 0015 * @done_tasklet: done tasklet object 0016 * @req: current active request 0017 * @result: result of current transform 0018 * @base: virtual IO base 0019 * @dev: pointer to device structure 0020 * @core: core device clock 0021 * @iface: interface clock 0022 * @bus: bus clock 0023 * @dma: pointer to dma data 0024 * @burst_size: the crypto burst size 0025 * @pipe_pair_id: which pipe pair id the device using 0026 * @async_req_enqueue: invoked by every algorithm to enqueue a request 0027 * @async_req_done: invoked by every algorithm to finish its request 0028 */ 0029 struct qce_device { 0030 struct crypto_queue queue; 0031 spinlock_t lock; 0032 struct tasklet_struct done_tasklet; 0033 struct crypto_async_request *req; 0034 int result; 0035 void __iomem *base; 0036 struct device *dev; 0037 struct clk *core, *iface, *bus; 0038 struct qce_dma_data dma; 0039 int burst_size; 0040 unsigned int pipe_pair_id; 0041 int (*async_req_enqueue)(struct qce_device *qce, 0042 struct crypto_async_request *req); 0043 void (*async_req_done)(struct qce_device *qce, int ret); 0044 }; 0045 0046 /** 0047 * struct qce_algo_ops - algorithm operations per crypto type 0048 * @type: should be CRYPTO_ALG_TYPE_XXX 0049 * @register_algs: invoked by core to register the algorithms 0050 * @unregister_algs: invoked by core to unregister the algorithms 0051 * @async_req_handle: invoked by core to handle enqueued request 0052 */ 0053 struct qce_algo_ops { 0054 u32 type; 0055 int (*register_algs)(struct qce_device *qce); 0056 void (*unregister_algs)(struct qce_device *qce); 0057 int (*async_req_handle)(struct crypto_async_request *async_req); 0058 }; 0059 0060 #endif /* _CORE_H_ */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |