Lines Matching refs:ce
61 struct sun8i_ce_dev *ce; in sun8i_ce_prng_generate() local
72 ce = algt->ce; in sun8i_ce_prng_generate()
75 dev_err(ce->dev, "not seeded\n"); in sun8i_ce_prng_generate()
89 dev_dbg(ce->dev, "%s PRNG slen=%u dlen=%u todo=%u multi=%u\n", __func__, in sun8i_ce_prng_generate()
97 dma_iv = dma_map_single(ce->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); in sun8i_ce_prng_generate()
98 if (dma_mapping_error(ce->dev, dma_iv)) { in sun8i_ce_prng_generate()
99 dev_err(ce->dev, "Cannot DMA MAP IV\n"); in sun8i_ce_prng_generate()
104 dma_dst = dma_map_single(ce->dev, d, todo, DMA_FROM_DEVICE); in sun8i_ce_prng_generate()
105 if (dma_mapping_error(ce->dev, dma_dst)) { in sun8i_ce_prng_generate()
106 dev_err(ce->dev, "Cannot DMA MAP DST\n"); in sun8i_ce_prng_generate()
111 err = pm_runtime_resume_and_get(ce->dev); in sun8i_ce_prng_generate()
115 mutex_lock(&ce->rnglock); in sun8i_ce_prng_generate()
116 chan = &ce->chanlist[flow]; in sun8i_ce_prng_generate()
122 common = ce->variant->prng | CE_COMM_INT; in sun8i_ce_prng_generate()
126 if (ce->variant->prng_t_dlen_in_bytes) in sun8i_ce_prng_generate()
140 ce->chanlist[flow].timeout = 2000; in sun8i_ce_prng_generate()
142 err = sun8i_ce_run_task(ce, 3, "PRNG"); in sun8i_ce_prng_generate()
143 mutex_unlock(&ce->rnglock); in sun8i_ce_prng_generate()
145 pm_runtime_put(ce->dev); in sun8i_ce_prng_generate()
148 dma_unmap_single(ce->dev, dma_dst, todo, DMA_FROM_DEVICE); in sun8i_ce_prng_generate()
150 dma_unmap_single(ce->dev, dma_iv, ctx->slen, DMA_TO_DEVICE); in sun8i_ce_prng_generate()