• Home
  • Raw
  • Download

Lines Matching refs:ce

84 	struct sun8i_ce_dev *ce = op->ce;  in sun8i_ce_cipher_prepare()  local
100 dev_dbg(ce->dev, "%s %s %u %x IV(%p %u) key=%u\n", __func__, in sun8i_ce_cipher_prepare()
112 chan = &ce->chanlist[flow]; in sun8i_ce_cipher_prepare()
118 common = ce->variant->alg_cipher[algt->ce_algo_id]; in sun8i_ce_cipher_prepare()
122 if (ce->variant->cipher_t_dlen_in_bytes) in sun8i_ce_cipher_prepare()
127 sym = ce->variant->op_mode[algt->ce_blockmode]; in sun8i_ce_cipher_prepare()
144 rctx->addr_key = dma_map_single(ce->dev, op->key, op->keylen, DMA_TO_DEVICE); in sun8i_ce_cipher_prepare()
145 if (dma_mapping_error(ce->dev, rctx->addr_key)) { in sun8i_ce_cipher_prepare()
146 dev_err(ce->dev, "Cannot DMA MAP KEY\n"); in sun8i_ce_cipher_prepare()
171 rctx->addr_iv = dma_map_single(ce->dev, rctx->bounce_iv, rctx->ivlen, in sun8i_ce_cipher_prepare()
173 if (dma_mapping_error(ce->dev, rctx->addr_iv)) { in sun8i_ce_cipher_prepare()
174 dev_err(ce->dev, "Cannot DMA MAP IV\n"); in sun8i_ce_cipher_prepare()
182 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
185 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare()
191 nr_sgs = dma_map_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
194 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ce_cipher_prepare()
198 nr_sgd = dma_map_sg(ce->dev, areq->dst, sg_nents(areq->dst), in sun8i_ce_cipher_prepare()
201 dev_err(ce->dev, "Invalid sg number %d\n", nr_sgd); in sun8i_ce_cipher_prepare()
212 dev_dbg(ce->dev, "%s total=%u SG(%d %u off=%d) todo=%u\n", __func__, in sun8i_ce_cipher_prepare()
217 dev_err(ce->dev, "remaining len %d\n", len); in sun8i_ce_cipher_prepare()
227 dev_dbg(ce->dev, "%s total=%u SG(%d %u off=%d) todo=%u\n", __func__, in sun8i_ce_cipher_prepare()
232 dev_err(ce->dev, "remaining len %d\n", len); in sun8i_ce_cipher_prepare()
244 dma_unmap_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
248 dma_unmap_sg(ce->dev, areq->src, sg_nents(areq->src), in sun8i_ce_cipher_prepare()
250 dma_unmap_sg(ce->dev, areq->dst, sg_nents(areq->dst), in sun8i_ce_cipher_prepare()
257 dma_unmap_single(ce->dev, rctx->addr_iv, rctx->ivlen, DMA_TO_DEVICE); in sun8i_ce_cipher_prepare()
270 dma_unmap_single(ce->dev, rctx->addr_key, op->keylen, DMA_TO_DEVICE); in sun8i_ce_cipher_prepare()
281 struct sun8i_ce_dev *ce = op->ce; in sun8i_ce_cipher_run() local
286 err = sun8i_ce_run_task(ce, flow, crypto_tfm_alg_name(breq->base.tfm)); in sun8i_ce_cipher_run()
298 struct sun8i_ce_dev *ce = op->ce; in sun8i_ce_cipher_unprepare() local
308 chan = &ce->chanlist[flow]; in sun8i_ce_cipher_unprepare()
313 dma_unmap_sg(ce->dev, areq->src, nr_sgs, DMA_BIDIRECTIONAL); in sun8i_ce_cipher_unprepare()
316 dma_unmap_sg(ce->dev, areq->src, nr_sgs, DMA_TO_DEVICE); in sun8i_ce_cipher_unprepare()
317 dma_unmap_sg(ce->dev, areq->dst, nr_sgd, DMA_FROM_DEVICE); in sun8i_ce_cipher_unprepare()
322 dma_unmap_single(ce->dev, rctx->addr_iv, rctx->ivlen, DMA_TO_DEVICE); in sun8i_ce_cipher_unprepare()
334 dma_unmap_single(ce->dev, rctx->addr_key, op->keylen, DMA_TO_DEVICE); in sun8i_ce_cipher_unprepare()
351 e = sun8i_ce_get_engine_number(op->ce); in sun8i_ce_skdecrypt()
353 engine = op->ce->chanlist[e].engine; in sun8i_ce_skdecrypt()
370 e = sun8i_ce_get_engine_number(op->ce); in sun8i_ce_skencrypt()
372 engine = op->ce->chanlist[e].engine; in sun8i_ce_skencrypt()
389 op->ce = algt->ce; in sun8i_ce_cipher_init()
393 dev_err(op->ce->dev, "ERROR: Cannot allocate fallback for %s %ld\n", in sun8i_ce_cipher_init()
402 dev_info(op->ce->dev, "Fallback for %s is %s\n", in sun8i_ce_cipher_init()
410 err = pm_runtime_get_sync(op->ce->dev); in sun8i_ce_cipher_init()
416 pm_runtime_put_noidle(op->ce->dev); in sun8i_ce_cipher_init()
427 pm_runtime_put_sync_suspend(op->ce->dev); in sun8i_ce_cipher_exit()
434 struct sun8i_ce_dev *ce = op->ce; in sun8i_ce_aes_setkey() local
444 dev_dbg(ce->dev, "ERROR: Invalid keylen %u\n", keylen); in sun8i_ce_aes_setkey()