Lines Matching full:qce
43 struct qce_device *qce = tmpl->qce; in qce_ahash_done() local
44 struct qce_result_dump *result = qce->dma.result_buf; in qce_ahash_done()
49 error = qce_dma_terminate_all(&qce->dma); in qce_ahash_done()
51 dev_dbg(qce->dev, "ahash dma termination error (%d)\n", error); in qce_ahash_done()
53 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE); in qce_ahash_done()
54 dma_unmap_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE); in qce_ahash_done()
63 error = qce_check_status(qce, &status); in qce_ahash_done()
65 dev_dbg(qce->dev, "ahash operation error (%x)\n", status); in qce_ahash_done()
72 qce->async_req_done(tmpl->qce, error); in qce_ahash_done()
81 struct qce_device *qce = tmpl->qce; in qce_ahash_async_req_handle() local
95 dev_err(qce->dev, "Invalid numbers of src SG.\n"); in qce_ahash_async_req_handle()
99 ret = dma_map_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE); in qce_ahash_async_req_handle()
103 sg_init_one(&rctx->result_sg, qce->dma.result_buf, QCE_RESULT_BUF_SZ); in qce_ahash_async_req_handle()
105 ret = dma_map_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE); in qce_ahash_async_req_handle()
111 ret = qce_dma_prep_sgs(&qce->dma, req->src, rctx->src_nents, in qce_ahash_async_req_handle()
116 qce_dma_issue_pending(&qce->dma); in qce_ahash_async_req_handle()
125 qce_dma_terminate_all(&qce->dma); in qce_ahash_async_req_handle()
127 dma_unmap_sg(qce->dev, &rctx->result_sg, 1, DMA_FROM_DEVICE); in qce_ahash_async_req_handle()
129 dma_unmap_sg(qce->dev, req->src, rctx->src_nents, DMA_TO_DEVICE); in qce_ahash_async_req_handle()
188 struct qce_device *qce = tmpl->qce; in qce_ahash_update() local
273 return qce->async_req_enqueue(tmpl->qce, &req->base); in qce_ahash_update()
280 struct qce_device *qce = tmpl->qce; in qce_ahash_final() local
300 return qce->async_req_enqueue(tmpl->qce, &req->base); in qce_ahash_final()
307 struct qce_device *qce = tmpl->qce; in qce_ahash_digest() local
326 return qce->async_req_enqueue(tmpl->qce, &req->base); in qce_ahash_digest()
352 alg_name = "sha1-qce"; in qce_ahash_hmac_setkey()
354 alg_name = "sha256-qce"; in qce_ahash_hmac_setkey()
417 .drv_name = "sha1-qce",
426 .drv_name = "sha256-qce",
435 .drv_name = "hmac-sha1-qce",
444 .drv_name = "hmac-sha256-qce",
453 struct qce_device *qce) in qce_ahash_register_one() argument
499 tmpl->qce = qce; in qce_ahash_register_one()
503 dev_err(qce->dev, "%s registration failed\n", base->cra_name); in qce_ahash_register_one()
509 dev_dbg(qce->dev, "%s is registered\n", base->cra_name); in qce_ahash_register_one()
513 static void qce_ahash_unregister(struct qce_device *qce) in qce_ahash_unregister() argument
524 static int qce_ahash_register(struct qce_device *qce) in qce_ahash_register() argument
529 ret = qce_ahash_register_one(&ahash_def[i], qce); in qce_ahash_register()
536 qce_ahash_unregister(qce); in qce_ahash_register()