Lines Matching refs:rkc
237 struct rk_crypto_info *rkc = rctx->dev; in rk_hash_prepare() local
240 ret = dma_map_sg(rkc->dev, areq->src, sg_nents(areq->src), DMA_TO_DEVICE); in rk_hash_prepare()
253 struct rk_crypto_info *rkc = rctx->dev; in rk_hash_unprepare() local
255 dma_unmap_sg(rkc->dev, areq->src, rctx->nrsg, DMA_TO_DEVICE); in rk_hash_unprepare()
266 struct rk_crypto_info *rkc = rctx->dev; in rk_hash_run() local
271 err = pm_runtime_resume_and_get(rkc->dev); in rk_hash_run()
282 rkc->nreq++; in rk_hash_run()
299 rk_ahash_reg_init(areq, rkc); in rk_hash_run()
302 reinit_completion(&rkc->complete); in rk_hash_run()
303 rkc->status = 0; in rk_hash_run()
304 crypto_ahash_dma_start(rkc, sg); in rk_hash_run()
305 wait_for_completion_interruptible_timeout(&rkc->complete, in rk_hash_run()
307 if (!rkc->status) { in rk_hash_run()
308 dev_err(rkc->dev, "DMA timeout\n"); in rk_hash_run()
325 readl_poll_timeout(rkc->reg + RK_CRYPTO_HASH_STS, v, v == 0, 10, 1000); in rk_hash_run()
328 v = readl(rkc->reg + RK_CRYPTO_HASH_DOUT_0 + i * 4); in rk_hash_run()
333 pm_runtime_put_autosuspend(rkc->dev); in rk_hash_run()