cc_request_mgr.h 1.2 KB

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