Linux Audio

Check our new training course

Loading...
v5.9
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
 3
 4/* \file cc_request_mgr.h
 5 * Request Manager
 6 */
 7
 8#ifndef __REQUEST_MGR_H__
 9#define __REQUEST_MGR_H__
10
11#include "cc_hw_queue_defs.h"
12
13int cc_req_mgr_init(struct cc_drvdata *drvdata);
14
15/**
16 * cc_send_request() - Enqueue caller request to crypto hardware.
17 *
18 * @drvdata: Associated device driver context
19 * @cc_req: The request to enqueue
20 * @desc: The crypto sequence
21 * @len: The crypto sequence length
22 * @req: Asynchronous crypto request
 
 
23 *
24 * Return:
25 * Returns -EINPROGRESS or error
26 */
27int cc_send_request(struct cc_drvdata *drvdata, struct cc_crypto_req *cc_req,
28		    struct cc_hw_desc *desc, unsigned int len,
29		    struct crypto_async_request *req);
30
31int cc_send_sync_request(struct cc_drvdata *drvdata,
32			 struct cc_crypto_req *cc_req, struct cc_hw_desc *desc,
33			 unsigned int len);
34
35int send_request_init(struct cc_drvdata *drvdata, struct cc_hw_desc *desc,
36		      unsigned int len);
37
38void complete_request(struct cc_drvdata *drvdata);
39
40void cc_req_mgr_fini(struct cc_drvdata *drvdata);
 
 
 
 
 
 
 
 
41
42#endif /*__REQUEST_MGR_H__*/
v5.4
 1/* SPDX-License-Identifier: GPL-2.0 */
 2/* Copyright (C) 2012-2019 ARM Limited (or its affiliates). */
 3
 4/* \file cc_request_mgr.h
 5 * Request Manager
 6 */
 7
 8#ifndef __REQUEST_MGR_H__
 9#define __REQUEST_MGR_H__
10
11#include "cc_hw_queue_defs.h"
12
13int cc_req_mgr_init(struct cc_drvdata *drvdata);
14
15/*!
16 * Enqueue caller request to crypto hardware.
17 *
18 * \param drvdata
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.
25 *
26 * \return int Returns -EINPROGRESS or error
 
27 */
28int 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);
31
32int cc_send_sync_request(struct cc_drvdata *drvdata,
33			 struct cc_crypto_req *cc_req, struct cc_hw_desc *desc,
34			 unsigned int len);
35
36int send_request_init(struct cc_drvdata *drvdata, struct cc_hw_desc *desc,
37		      unsigned int len);
38
39void complete_request(struct cc_drvdata *drvdata);
40
41void cc_req_mgr_fini(struct cc_drvdata *drvdata);
42
43#if defined(CONFIG_PM)
44int cc_resume_req_queue(struct cc_drvdata *drvdata);
45
46int cc_suspend_req_queue(struct cc_drvdata *drvdata);
47
48bool cc_req_queue_suspended(struct cc_drvdata *drvdata);
49#endif
50
51#endif /*__REQUEST_MGR_H__*/