Lines Matching refs:cryp

45 	struct starfive_cryp_dev *cryp = ctx->cryp;  in starfive_pka_wait_done()  local
47 return wait_for_completion_timeout(&cryp->pka_done, in starfive_pka_wait_done()
53 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_pka_irq_mask_clear() local
56 stat = readl(cryp->base + STARFIVE_IE_MASK_OFFSET); in starfive_pka_irq_mask_clear()
58 writel(stat, cryp->base + STARFIVE_IE_MASK_OFFSET); in starfive_pka_irq_mask_clear()
60 reinit_completion(&cryp->pka_done); in starfive_pka_irq_mask_clear()
92 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_rsa_montgomery_form() local
102 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
105 writel(mod[opsize - loop], cryp->base + STARFIVE_PKA_CANR_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
118 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
124 writel(in[opsize - loop], cryp->base + STARFIVE_PKA_CAAR_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
126 writel(0x1000000, cryp->base + STARFIVE_PKA_CAER_OFFSET); in starfive_rsa_montgomery_form()
129 writel(0, cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
140 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
155 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
161 writel(in[count - loop], cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
165 writel(0, cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
176 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
183 temp = readl(cryp->base + STARFIVE_PKA_CAAR_OFFSET + 0x4 * loop); in starfive_rsa_montgomery_form()
193 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_rsa_cpu_start() local
210 dev_err_probe(cryp->dev, ret, "Conversion to Montgomery failed"); in starfive_rsa_cpu_start()
216 cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_cpu_start()
230 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_cpu_start()
246 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_cpu_start()
254 temp = readl(cryp->base + STARFIVE_PKA_CAAR_OFFSET + 0x4 * loop); in starfive_rsa_cpu_start()
260 dev_err_probe(cryp->dev, ret, "Conversion from Montgomery failed"); in starfive_rsa_cpu_start()
274 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_rsa_enc_core() local
279 writel(STARFIVE_RSA_RESET, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_enc_core()
301 writel(STARFIVE_RSA_RESET, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_enc_core()
310 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_rsa_enc() local
326 return dev_err_probe(cryp->dev, -EOVERFLOW, in starfive_rsa_enc()
342 struct starfive_cryp_dev *cryp = ctx->cryp; in starfive_rsa_dec() local
358 return dev_err_probe(cryp->dev, -EOVERFLOW, in starfive_rsa_dec()
567 ctx->cryp = starfive_cryp_find_dev(ctx); in starfive_rsa_init_tfm()
568 if (!ctx->cryp) { in starfive_rsa_init_tfm()