Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
0003 
0004 /* \file cc_request_mgr.h
0005  * Request Manager
0006  */
0007 
0008 #ifndef __REQUEST_MGR_H__
0009 #define __REQUEST_MGR_H__
0010 
0011 #include "cc_hw_queue_defs.h"
0012 
0013 int cc_req_mgr_init(struct cc_drvdata *drvdata);
0014 
0015 /**
0016  * cc_send_request() - Enqueue caller request to crypto hardware.
0017  *
0018  * @drvdata: Associated device driver context
0019  * @cc_req: The request to enqueue
0020  * @desc: The crypto sequence
0021  * @len: The crypto sequence length
0022  * @req: Asynchronous crypto request
0023  *
0024  * Return:
0025  * Returns -EINPROGRESS or error
0026  */
0027 int cc_send_request(struct cc_drvdata *drvdata, struct cc_crypto_req *cc_req,
0028             struct cc_hw_desc *desc, unsigned int len,
0029             struct crypto_async_request *req);
0030 
0031 int cc_send_sync_request(struct cc_drvdata *drvdata,
0032              struct cc_crypto_req *cc_req, struct cc_hw_desc *desc,
0033              unsigned int len);
0034 
0035 int send_request_init(struct cc_drvdata *drvdata, struct cc_hw_desc *desc,
0036               unsigned int len);
0037 
0038 void complete_request(struct cc_drvdata *drvdata);
0039 
0040 void cc_req_mgr_fini(struct cc_drvdata *drvdata);
0041 
0042 #endif /*__REQUEST_MGR_H__*/