Lines Matching refs:tctx
80 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_ahash_reg_init() local
81 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_reg_init()
198 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(req->base.tfm); in rk_ahash_digest() local
199 struct rk_crypto_info *dev = tctx->dev; in rk_ahash_digest()
223 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_prepare() local
226 ret = dma_map_sg(tctx->dev->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in rk_hash_prepare()
240 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_unprepare() local
242 dma_unmap_sg(tctx->dev->dev, areq->src, rctx->nrsg, DMA_TO_DEVICE); in rk_hash_unprepare()
251 struct rk_ahash_ctx *tctx = crypto_ahash_ctx(tfm); in rk_hash_run() local
277 reinit_completion(&tctx->dev->complete); in rk_hash_run()
278 tctx->dev->status = 0; in rk_hash_run()
279 crypto_ahash_dma_start(tctx->dev, sg); in rk_hash_run()
280 wait_for_completion_interruptible_timeout(&tctx->dev->complete, in rk_hash_run()
282 if (!tctx->dev->status) { in rk_hash_run()
283 dev_err(tctx->dev->dev, "DMA timeout\n"); in rk_hash_run()
300 while (!CRYPTO_READ(tctx->dev, RK_CRYPTO_HASH_STS)) in rk_hash_run()
304 v = readl(tctx->dev->reg + RK_CRYPTO_HASH_DOUT_0 + i * 4); in rk_hash_run()
318 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(tfm); in rk_cra_hash_init() local
326 tctx->dev = algt->dev; in rk_cra_hash_init()
329 tctx->fallback_tfm = crypto_alloc_ahash(alg_name, 0, in rk_cra_hash_init()
331 if (IS_ERR(tctx->fallback_tfm)) { in rk_cra_hash_init()
332 dev_err(tctx->dev->dev, "Could not load fallback driver.\n"); in rk_cra_hash_init()
333 return PTR_ERR(tctx->fallback_tfm); in rk_cra_hash_init()
338 crypto_ahash_reqsize(tctx->fallback_tfm)); in rk_cra_hash_init()
340 tctx->enginectx.op.do_one_request = rk_hash_run; in rk_cra_hash_init()
341 tctx->enginectx.op.prepare_request = rk_hash_prepare; in rk_cra_hash_init()
342 tctx->enginectx.op.unprepare_request = rk_hash_unprepare; in rk_cra_hash_init()
349 struct rk_ahash_ctx *tctx = crypto_tfm_ctx(tfm); in rk_cra_hash_exit() local
351 crypto_free_ahash(tctx->fallback_tfm); in rk_cra_hash_exit()