Lines Matching refs:ss
99 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_cipher() local
113 dev_dbg(ss->dev, "%s %s %u %x IV(%p %u) key=%u\n", __func__, in sun8i_ss_cipher()
123 rctx->op_mode = ss->variant->op_mode[algt->ss_blockmode]; in sun8i_ss_cipher()
124 rctx->method = ss->variant->alg_cipher[algt->ss_algo_id]; in sun8i_ss_cipher()
127 rctx->p_key = dma_map_single(ss->dev, op->key, op->keylen, DMA_TO_DEVICE); in sun8i_ss_cipher()
128 if (dma_mapping_error(ss->dev, rctx->p_key)) { in sun8i_ss_cipher()
129 dev_err(ss->dev, "Cannot DMA MAP KEY\n"); in sun8i_ss_cipher()
153 rctx->p_iv = dma_map_single(ss->dev, rctx->biv, rctx->ivlen, in sun8i_ss_cipher()
155 if (dma_mapping_error(ss->dev, rctx->p_iv)) { in sun8i_ss_cipher()
156 dev_err(ss->dev, "Cannot DMA MAP IV\n"); in sun8i_ss_cipher()
162 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
165 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
171 nr_sgs = dma_map_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
174 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgs); in sun8i_ss_cipher()
178 nr_sgd = dma_map_sg(ss->dev, areq->dst, sg_nents(areq->dst), in sun8i_ss_cipher()
181 dev_err(ss->dev, "Invalid sg number %d\n", nr_sgd); in sun8i_ss_cipher()
196 dev_dbg(ss->dev, "%s total=%u SGS(%d %u off=%d) todo=%u\n", __func__, in sun8i_ss_cipher()
204 dev_err(ss->dev, "remaining len %d\n", len); in sun8i_ss_cipher()
218 dev_dbg(ss->dev, "%s total=%u SGD(%d %u off=%d) todo=%u\n", __func__, in sun8i_ss_cipher()
226 dev_err(ss->dev, "remaining len %d\n", len); in sun8i_ss_cipher()
231 err = sun8i_ss_run_task(ss, rctx, crypto_tfm_alg_name(areq->base.tfm)); in sun8i_ss_cipher()
235 dma_unmap_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
238 dma_unmap_sg(ss->dev, areq->src, sg_nents(areq->src), in sun8i_ss_cipher()
240 dma_unmap_sg(ss->dev, areq->dst, sg_nents(areq->dst), in sun8i_ss_cipher()
246 dma_unmap_single(ss->dev, rctx->p_iv, rctx->ivlen, in sun8i_ss_cipher()
264 dma_unmap_single(ss->dev, rctx->p_key, op->keylen, DMA_TO_DEVICE); in sun8i_ss_cipher()
296 e = sun8i_ss_get_engine_number(op->ss); in sun8i_ss_skdecrypt()
297 engine = op->ss->flows[e].engine; in sun8i_ss_skdecrypt()
317 e = sun8i_ss_get_engine_number(op->ss); in sun8i_ss_skencrypt()
318 engine = op->ss->flows[e].engine; in sun8i_ss_skencrypt()
336 op->ss = algt->ss; in sun8i_ss_cipher_init()
340 dev_err(op->ss->dev, "ERROR: Cannot allocate fallback for %s %ld\n", in sun8i_ss_cipher_init()
349 dev_info(op->ss->dev, "Fallback for %s is %s\n", in sun8i_ss_cipher_init()
357 err = pm_runtime_resume_and_get(op->ss->dev); in sun8i_ss_cipher_init()
359 dev_err(op->ss->dev, "pm error %d\n", err); in sun8i_ss_cipher_init()
375 pm_runtime_put_sync(op->ss->dev); in sun8i_ss_cipher_exit()
382 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_aes_setkey() local
392 dev_dbg(ss->dev, "ERROR: Invalid keylen %u\n", keylen); in sun8i_ss_aes_setkey()
411 struct sun8i_ss_dev *ss = op->ss; in sun8i_ss_des3_setkey() local
414 dev_dbg(ss->dev, "Invalid keylen %u\n", keylen); in sun8i_ss_des3_setkey()