• Home
  • Raw
  • Download

Lines Matching refs:rctx

93 	struct starfive_cryp_request_ctx *rctx = ctx->rctx;  in starfive_rsa_montgomery_form()  local
94 int count = rctx->total / sizeof(u32) - 1; in starfive_rsa_montgomery_form()
100 rctx->csr.pka.v = 0; in starfive_rsa_montgomery_form()
102 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
108 rctx->csr.pka.v = 0; in starfive_rsa_montgomery_form()
109 rctx->csr.pka.cln_done = 1; in starfive_rsa_montgomery_form()
110 rctx->csr.pka.opsize = opsize; in starfive_rsa_montgomery_form()
111 rctx->csr.pka.exposize = opsize; in starfive_rsa_montgomery_form()
112 rctx->csr.pka.cmd = CRYPTO_CMD_PRE; in starfive_rsa_montgomery_form()
113 rctx->csr.pka.start = 1; in starfive_rsa_montgomery_form()
114 rctx->csr.pka.not_r2 = 1; in starfive_rsa_montgomery_form()
115 rctx->csr.pka.ie = 1; in starfive_rsa_montgomery_form()
118 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
131 rctx->csr.pka.v = 0; in starfive_rsa_montgomery_form()
132 rctx->csr.pka.cln_done = 1; in starfive_rsa_montgomery_form()
133 rctx->csr.pka.opsize = opsize; in starfive_rsa_montgomery_form()
134 rctx->csr.pka.exposize = opsize; in starfive_rsa_montgomery_form()
135 rctx->csr.pka.cmd = CRYPTO_CMD_AERN; in starfive_rsa_montgomery_form()
136 rctx->csr.pka.start = 1; in starfive_rsa_montgomery_form()
137 rctx->csr.pka.ie = 1; in starfive_rsa_montgomery_form()
140 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
145 rctx->csr.pka.v = 0; in starfive_rsa_montgomery_form()
146 rctx->csr.pka.cln_done = 1; in starfive_rsa_montgomery_form()
147 rctx->csr.pka.opsize = opsize; in starfive_rsa_montgomery_form()
148 rctx->csr.pka.exposize = opsize; in starfive_rsa_montgomery_form()
149 rctx->csr.pka.cmd = CRYPTO_CMD_PRE; in starfive_rsa_montgomery_form()
150 rctx->csr.pka.start = 1; in starfive_rsa_montgomery_form()
151 rctx->csr.pka.pre_expf = 1; in starfive_rsa_montgomery_form()
152 rctx->csr.pka.ie = 1; in starfive_rsa_montgomery_form()
155 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
167 rctx->csr.pka.v = 0; in starfive_rsa_montgomery_form()
168 rctx->csr.pka.cln_done = 1; in starfive_rsa_montgomery_form()
169 rctx->csr.pka.opsize = opsize; in starfive_rsa_montgomery_form()
170 rctx->csr.pka.exposize = opsize; in starfive_rsa_montgomery_form()
171 rctx->csr.pka.cmd = CRYPTO_CMD_ARN; in starfive_rsa_montgomery_form()
172 rctx->csr.pka.start = 1; in starfive_rsa_montgomery_form()
173 rctx->csr.pka.ie = 1; in starfive_rsa_montgomery_form()
176 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_montgomery_form()
194 struct starfive_cryp_request_ctx *rctx = ctx->rctx; in starfive_rsa_cpu_start() local
207 ret = starfive_rsa_montgomery_form(ctx, mta, (u32 *)rctx->rsa_data, in starfive_rsa_cpu_start()
221 rctx->csr.pka.v = 0; in starfive_rsa_cpu_start()
222 rctx->csr.pka.cln_done = 1; in starfive_rsa_cpu_start()
223 rctx->csr.pka.opsize = opsize; in starfive_rsa_cpu_start()
224 rctx->csr.pka.exposize = opsize; in starfive_rsa_cpu_start()
225 rctx->csr.pka.cmd = CRYPTO_CMD_AARN; in starfive_rsa_cpu_start()
226 rctx->csr.pka.start = 1; in starfive_rsa_cpu_start()
227 rctx->csr.pka.ie = 1; in starfive_rsa_cpu_start()
230 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_cpu_start()
237 rctx->csr.pka.v = 0; in starfive_rsa_cpu_start()
238 rctx->csr.pka.cln_done = 1; in starfive_rsa_cpu_start()
239 rctx->csr.pka.opsize = opsize; in starfive_rsa_cpu_start()
240 rctx->csr.pka.exposize = opsize; in starfive_rsa_cpu_start()
241 rctx->csr.pka.cmd = CRYPTO_CMD_AERN; in starfive_rsa_cpu_start()
242 rctx->csr.pka.start = 1; in starfive_rsa_cpu_start()
243 rctx->csr.pka.ie = 1; in starfive_rsa_cpu_start()
246 writel(rctx->csr.pka.v, cryp->base + STARFIVE_PKA_CACR_OFFSET); in starfive_rsa_cpu_start()
275 struct starfive_cryp_request_ctx *rctx = ctx->rctx; in starfive_rsa_enc_core() local
281 rctx->total = sg_copy_to_buffer(rctx->in_sg, rctx->nents, in starfive_rsa_enc_core()
282 rctx->rsa_data, rctx->total); in starfive_rsa_enc_core()
286 ret = starfive_rsa_start(ctx, rctx->rsa_data, key->e, in starfive_rsa_enc_core()
290 ret = starfive_rsa_start(ctx, rctx->rsa_data, key->d, in starfive_rsa_enc_core()
297 sg_copy_buffer(rctx->out_sg, sg_nents(rctx->out_sg), in starfive_rsa_enc_core()
298 rctx->rsa_data, key->key_sz, 0, 0); in starfive_rsa_enc_core()
302 kfree(rctx->rsa_data); in starfive_rsa_enc_core()
312 struct starfive_cryp_request_ctx *rctx = akcipher_request_ctx(req); in starfive_rsa_enc() local
329 rctx->in_sg = req->src; in starfive_rsa_enc()
330 rctx->out_sg = req->dst; in starfive_rsa_enc()
331 rctx->total = req->src_len; in starfive_rsa_enc()
332 rctx->nents = sg_nents(rctx->in_sg); in starfive_rsa_enc()
333 ctx->rctx = rctx; in starfive_rsa_enc()
344 struct starfive_cryp_request_ctx *rctx = akcipher_request_ctx(req); in starfive_rsa_dec() local
361 rctx->in_sg = req->src; in starfive_rsa_dec()
362 rctx->out_sg = req->dst; in starfive_rsa_dec()
363 ctx->rctx = rctx; in starfive_rsa_dec()
364 rctx->total = req->src_len; in starfive_rsa_dec()