Lines Matching refs:pdb

62 	struct rsa_pub_pdb *pdb = &edesc->pdb.pub;  in rsa_pub_unmap()  local
64 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_pub_unmap()
65 dma_unmap_single(dev, pdb->e_dma, key->e_sz, DMA_TO_DEVICE); in rsa_pub_unmap()
74 struct rsa_priv_f1_pdb *pdb = &edesc->pdb.priv_f1; in rsa_priv_f1_unmap() local
76 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap()
77 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap()
86 struct rsa_priv_f2_pdb *pdb = &edesc->pdb.priv_f2; in rsa_priv_f2_unmap() local
90 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
91 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
92 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
93 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in rsa_priv_f2_unmap()
94 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL); in rsa_priv_f2_unmap()
103 struct rsa_priv_f3_pdb *pdb = &edesc->pdb.priv_f3; in rsa_priv_f3_unmap() local
107 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
108 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
109 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
110 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
111 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
112 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in rsa_priv_f3_unmap()
113 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL); in rsa_priv_f3_unmap()
405 struct rsa_pub_pdb *pdb = &edesc->pdb.pub; in set_rsa_pub_pdb() local
408 pdb->n_dma = dma_map_single(dev, key->n, key->n_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
409 if (dma_mapping_error(dev, pdb->n_dma)) { in set_rsa_pub_pdb()
414 pdb->e_dma = dma_map_single(dev, key->e, key->e_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
415 if (dma_mapping_error(dev, pdb->e_dma)) { in set_rsa_pub_pdb()
417 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
422 pdb->sgf |= RSA_PDB_SGF_F; in set_rsa_pub_pdb()
423 pdb->f_dma = edesc->sec4_sg_dma; in set_rsa_pub_pdb()
426 pdb->f_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_pub_pdb()
430 pdb->sgf |= RSA_PDB_SGF_G; in set_rsa_pub_pdb()
431 pdb->g_dma = edesc->sec4_sg_dma + in set_rsa_pub_pdb()
434 pdb->g_dma = sg_dma_address(req->dst); in set_rsa_pub_pdb()
437 pdb->sgf |= (key->e_sz << RSA_PDB_E_SHIFT) | key->n_sz; in set_rsa_pub_pdb()
438 pdb->f_len = req_ctx->fixup_src_len; in set_rsa_pub_pdb()
450 struct rsa_priv_f1_pdb *pdb = &edesc->pdb.priv_f1; in set_rsa_priv_f1_pdb() local
453 pdb->n_dma = dma_map_single(dev, key->n, key->n_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
454 if (dma_mapping_error(dev, pdb->n_dma)) { in set_rsa_priv_f1_pdb()
459 pdb->d_dma = dma_map_single(dev, key->d, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
460 if (dma_mapping_error(dev, pdb->d_dma)) { in set_rsa_priv_f1_pdb()
462 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
467 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f1_pdb()
468 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f1_pdb()
474 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f1_pdb()
478 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f1_pdb()
479 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f1_pdb()
482 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f1_pdb()
485 pdb->sgf |= (key->d_sz << RSA_PDB_D_SHIFT) | key->n_sz; in set_rsa_priv_f1_pdb()
497 struct rsa_priv_f2_pdb *pdb = &edesc->pdb.priv_f2; in set_rsa_priv_f2_pdb() local
502 pdb->d_dma = dma_map_single(dev, key->d, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
503 if (dma_mapping_error(dev, pdb->d_dma)) { in set_rsa_priv_f2_pdb()
508 pdb->p_dma = dma_map_single(dev, key->p, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
509 if (dma_mapping_error(dev, pdb->p_dma)) { in set_rsa_priv_f2_pdb()
514 pdb->q_dma = dma_map_single(dev, key->q, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
515 if (dma_mapping_error(dev, pdb->q_dma)) { in set_rsa_priv_f2_pdb()
520 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
521 if (dma_mapping_error(dev, pdb->tmp1_dma)) { in set_rsa_priv_f2_pdb()
526 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
527 if (dma_mapping_error(dev, pdb->tmp2_dma)) { in set_rsa_priv_f2_pdb()
533 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f2_pdb()
534 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f2_pdb()
539 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f2_pdb()
543 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f2_pdb()
544 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f2_pdb()
547 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f2_pdb()
550 pdb->sgf |= (key->d_sz << RSA_PDB_D_SHIFT) | key->n_sz; in set_rsa_priv_f2_pdb()
551 pdb->p_q_len = (q_sz << RSA_PDB_Q_SHIFT) | p_sz; in set_rsa_priv_f2_pdb()
556 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
558 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
560 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
562 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
574 struct rsa_priv_f3_pdb *pdb = &edesc->pdb.priv_f3; in set_rsa_priv_f3_pdb() local
579 pdb->p_dma = dma_map_single(dev, key->p, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
580 if (dma_mapping_error(dev, pdb->p_dma)) { in set_rsa_priv_f3_pdb()
585 pdb->q_dma = dma_map_single(dev, key->q, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
586 if (dma_mapping_error(dev, pdb->q_dma)) { in set_rsa_priv_f3_pdb()
591 pdb->dp_dma = dma_map_single(dev, key->dp, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
592 if (dma_mapping_error(dev, pdb->dp_dma)) { in set_rsa_priv_f3_pdb()
597 pdb->dq_dma = dma_map_single(dev, key->dq, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
598 if (dma_mapping_error(dev, pdb->dq_dma)) { in set_rsa_priv_f3_pdb()
603 pdb->c_dma = dma_map_single(dev, key->qinv, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
604 if (dma_mapping_error(dev, pdb->c_dma)) { in set_rsa_priv_f3_pdb()
609 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
610 if (dma_mapping_error(dev, pdb->tmp1_dma)) { in set_rsa_priv_f3_pdb()
615 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
616 if (dma_mapping_error(dev, pdb->tmp2_dma)) { in set_rsa_priv_f3_pdb()
622 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f3_pdb()
623 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f3_pdb()
628 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f3_pdb()
632 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f3_pdb()
633 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f3_pdb()
636 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f3_pdb()
639 pdb->sgf |= key->n_sz; in set_rsa_priv_f3_pdb()
640 pdb->p_q_len = (q_sz << RSA_PDB_Q_SHIFT) | p_sz; in set_rsa_priv_f3_pdb()
645 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
647 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
649 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
651 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
653 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
655 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
736 init_rsa_pub_desc(edesc->hw_desc, &edesc->pdb.pub); in caam_rsa_enc()
765 init_rsa_priv_f1_desc(edesc->hw_desc, &edesc->pdb.priv_f1); in caam_rsa_dec_priv_f1()
794 init_rsa_priv_f2_desc(edesc->hw_desc, &edesc->pdb.priv_f2); in caam_rsa_dec_priv_f2()
823 init_rsa_priv_f3_desc(edesc->hw_desc, &edesc->pdb.priv_f3); in caam_rsa_dec_priv_f3()