1 /* SPDX-License-Identifier: GPL-2.0 */
2 /* Copyright (C) 2012-2018 ARM Limited or its affiliates. */
4 /* \file cc_request_mgr.h
8 #ifndef __REQUEST_MGR_H__
9 #define __REQUEST_MGR_H__
11 #include "cc_hw_queue_defs.h"
13 int cc_req_mgr_init(struct cc_drvdata
*drvdata
);
16 * Enqueue caller request to crypto hardware.
19 * \param cc_req The request to enqueue
20 * \param desc The crypto sequence
21 * \param len The crypto sequence length
22 * \param is_dout If "true": completion is handled by the caller
23 * If "false": this function adds a dummy descriptor completion
24 * and waits upon completion signal.
26 * \return int Returns -EINPROGRESS or error
28 int cc_send_request(struct cc_drvdata
*drvdata
, struct cc_crypto_req
*cc_req
,
29 struct cc_hw_desc
*desc
, unsigned int len
,
30 struct crypto_async_request
*req
);
32 int cc_send_sync_request(struct cc_drvdata
*drvdata
,
33 struct cc_crypto_req
*cc_req
, struct cc_hw_desc
*desc
,
36 int send_request_init(struct cc_drvdata
*drvdata
, struct cc_hw_desc
*desc
,
39 void complete_request(struct cc_drvdata
*drvdata
);
41 void cc_req_mgr_fini(struct cc_drvdata
*drvdata
);
43 #endif /*__REQUEST_MGR_H__*/