Lines Matching refs:pdb

68 	struct rsa_pub_pdb *pdb = &edesc->pdb.pub;  in rsa_pub_unmap()  local
70 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_pub_unmap()
71 dma_unmap_single(dev, pdb->e_dma, key->e_sz, DMA_TO_DEVICE); in rsa_pub_unmap()
80 struct rsa_priv_f1_pdb *pdb = &edesc->pdb.priv_f1; in rsa_priv_f1_unmap() local
82 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap()
83 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f1_unmap()
92 struct rsa_priv_f2_pdb *pdb = &edesc->pdb.priv_f2; in rsa_priv_f2_unmap() local
96 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
97 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
98 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f2_unmap()
99 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in rsa_priv_f2_unmap()
100 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL); in rsa_priv_f2_unmap()
109 struct rsa_priv_f3_pdb *pdb = &edesc->pdb.priv_f3; in rsa_priv_f3_unmap() local
113 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
114 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
115 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
116 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
117 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); in rsa_priv_f3_unmap()
118 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in rsa_priv_f3_unmap()
119 dma_unmap_single(dev, pdb->tmp2_dma, q_sz, DMA_BIDIRECTIONAL); in rsa_priv_f3_unmap()
412 struct rsa_pub_pdb *pdb = &edesc->pdb.pub; in set_rsa_pub_pdb() local
415 pdb->n_dma = dma_map_single(dev, key->n, key->n_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
416 if (dma_mapping_error(dev, pdb->n_dma)) { in set_rsa_pub_pdb()
421 pdb->e_dma = dma_map_single(dev, key->e, key->e_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
422 if (dma_mapping_error(dev, pdb->e_dma)) { in set_rsa_pub_pdb()
424 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in set_rsa_pub_pdb()
429 pdb->sgf |= RSA_PDB_SGF_F; in set_rsa_pub_pdb()
430 pdb->f_dma = edesc->sec4_sg_dma; in set_rsa_pub_pdb()
433 pdb->f_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_pub_pdb()
437 pdb->sgf |= RSA_PDB_SGF_G; in set_rsa_pub_pdb()
438 pdb->g_dma = edesc->sec4_sg_dma + in set_rsa_pub_pdb()
441 pdb->g_dma = sg_dma_address(req->dst); in set_rsa_pub_pdb()
444 pdb->sgf |= (key->e_sz << RSA_PDB_E_SHIFT) | key->n_sz; in set_rsa_pub_pdb()
445 pdb->f_len = req_ctx->fixup_src_len; in set_rsa_pub_pdb()
457 struct rsa_priv_f1_pdb *pdb = &edesc->pdb.priv_f1; in set_rsa_priv_f1_pdb() local
460 pdb->n_dma = dma_map_single(dev, key->n, key->n_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
461 if (dma_mapping_error(dev, pdb->n_dma)) { in set_rsa_priv_f1_pdb()
466 pdb->d_dma = dma_map_single(dev, key->d, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
467 if (dma_mapping_error(dev, pdb->d_dma)) { in set_rsa_priv_f1_pdb()
469 dma_unmap_single(dev, pdb->n_dma, key->n_sz, DMA_TO_DEVICE); in set_rsa_priv_f1_pdb()
474 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f1_pdb()
475 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f1_pdb()
481 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f1_pdb()
485 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f1_pdb()
486 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f1_pdb()
489 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f1_pdb()
492 pdb->sgf |= (key->d_sz << RSA_PDB_D_SHIFT) | key->n_sz; in set_rsa_priv_f1_pdb()
504 struct rsa_priv_f2_pdb *pdb = &edesc->pdb.priv_f2; in set_rsa_priv_f2_pdb() local
509 pdb->d_dma = dma_map_single(dev, key->d, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
510 if (dma_mapping_error(dev, pdb->d_dma)) { in set_rsa_priv_f2_pdb()
515 pdb->p_dma = dma_map_single(dev, key->p, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
516 if (dma_mapping_error(dev, pdb->p_dma)) { in set_rsa_priv_f2_pdb()
521 pdb->q_dma = dma_map_single(dev, key->q, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
522 if (dma_mapping_error(dev, pdb->q_dma)) { in set_rsa_priv_f2_pdb()
527 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
528 if (dma_mapping_error(dev, pdb->tmp1_dma)) { in set_rsa_priv_f2_pdb()
533 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
534 if (dma_mapping_error(dev, pdb->tmp2_dma)) { in set_rsa_priv_f2_pdb()
540 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f2_pdb()
541 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f2_pdb()
546 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f2_pdb()
550 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f2_pdb()
551 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f2_pdb()
554 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f2_pdb()
557 pdb->sgf |= (key->d_sz << RSA_PDB_D_SHIFT) | key->n_sz; in set_rsa_priv_f2_pdb()
558 pdb->p_q_len = (q_sz << RSA_PDB_Q_SHIFT) | p_sz; in set_rsa_priv_f2_pdb()
563 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f2_pdb()
565 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
567 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
569 dma_unmap_single(dev, pdb->d_dma, key->d_sz, DMA_TO_DEVICE); in set_rsa_priv_f2_pdb()
581 struct rsa_priv_f3_pdb *pdb = &edesc->pdb.priv_f3; in set_rsa_priv_f3_pdb() local
586 pdb->p_dma = dma_map_single(dev, key->p, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
587 if (dma_mapping_error(dev, pdb->p_dma)) { in set_rsa_priv_f3_pdb()
592 pdb->q_dma = dma_map_single(dev, key->q, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
593 if (dma_mapping_error(dev, pdb->q_dma)) { in set_rsa_priv_f3_pdb()
598 pdb->dp_dma = dma_map_single(dev, key->dp, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
599 if (dma_mapping_error(dev, pdb->dp_dma)) { in set_rsa_priv_f3_pdb()
604 pdb->dq_dma = dma_map_single(dev, key->dq, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
605 if (dma_mapping_error(dev, pdb->dq_dma)) { in set_rsa_priv_f3_pdb()
610 pdb->c_dma = dma_map_single(dev, key->qinv, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
611 if (dma_mapping_error(dev, pdb->c_dma)) { in set_rsa_priv_f3_pdb()
616 pdb->tmp1_dma = dma_map_single(dev, key->tmp1, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
617 if (dma_mapping_error(dev, pdb->tmp1_dma)) { in set_rsa_priv_f3_pdb()
622 pdb->tmp2_dma = dma_map_single(dev, key->tmp2, q_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
623 if (dma_mapping_error(dev, pdb->tmp2_dma)) { in set_rsa_priv_f3_pdb()
629 pdb->sgf |= RSA_PRIV_PDB_SGF_G; in set_rsa_priv_f3_pdb()
630 pdb->g_dma = edesc->sec4_sg_dma; in set_rsa_priv_f3_pdb()
635 pdb->g_dma = sg_dma_address(req_ctx->fixup_src); in set_rsa_priv_f3_pdb()
639 pdb->sgf |= RSA_PRIV_PDB_SGF_F; in set_rsa_priv_f3_pdb()
640 pdb->f_dma = edesc->sec4_sg_dma + in set_rsa_priv_f3_pdb()
643 pdb->f_dma = sg_dma_address(req->dst); in set_rsa_priv_f3_pdb()
646 pdb->sgf |= key->n_sz; in set_rsa_priv_f3_pdb()
647 pdb->p_q_len = (q_sz << RSA_PDB_Q_SHIFT) | p_sz; in set_rsa_priv_f3_pdb()
652 dma_unmap_single(dev, pdb->tmp1_dma, p_sz, DMA_BIDIRECTIONAL); in set_rsa_priv_f3_pdb()
654 dma_unmap_single(dev, pdb->c_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
656 dma_unmap_single(dev, pdb->dq_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
658 dma_unmap_single(dev, pdb->dp_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
660 dma_unmap_single(dev, pdb->q_dma, q_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
662 dma_unmap_single(dev, pdb->p_dma, p_sz, DMA_TO_DEVICE); in set_rsa_priv_f3_pdb()
743 init_rsa_pub_desc(edesc->hw_desc, &edesc->pdb.pub); in caam_rsa_enc()
772 init_rsa_priv_f1_desc(edesc->hw_desc, &edesc->pdb.priv_f1); in caam_rsa_dec_priv_f1()
801 init_rsa_priv_f2_desc(edesc->hw_desc, &edesc->pdb.priv_f2); in caam_rsa_dec_priv_f2()
830 init_rsa_priv_f3_desc(edesc->hw_desc, &edesc->pdb.priv_f3); in caam_rsa_dec_priv_f3()