Lines Matching full:loop
77 int loop; in starfive_rsa_montgomery_form() local
86 for (loop = 0; loop <= opsize; loop++) in starfive_rsa_montgomery_form()
87 writel(mod[opsize - loop], cryp->base + STARFIVE_PKA_CANR_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
104 for (loop = 0; loop <= opsize; loop++) in starfive_rsa_montgomery_form()
105 writel(in[opsize - loop], cryp->base + STARFIVE_PKA_CAAR_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
109 for (loop = 1; loop <= opsize; loop++) in starfive_rsa_montgomery_form()
110 writel(0, cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
139 for (loop = 0; loop <= count; loop++) in starfive_rsa_montgomery_form()
140 writel(in[count - loop], cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
143 for (loop = count + 1; loop <= opsize; loop++) in starfive_rsa_montgomery_form()
144 writel(0, cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_montgomery_form()
160 for (loop = 0; loop <= opsize; loop++) { in starfive_rsa_montgomery_form()
161 temp = readl(cryp->base + STARFIVE_PKA_CAAR_OFFSET + 0x4 * loop); in starfive_rsa_montgomery_form()
162 out[opsize - loop] = temp; in starfive_rsa_montgomery_form()
176 int opsize, mlen, loop; in starfive_rsa_cpu_start() local
192 for (loop = 0; loop <= opsize; loop++) in starfive_rsa_cpu_start()
193 writel(mta[opsize - loop], in starfive_rsa_cpu_start()
194 cryp->base + STARFIVE_PKA_CAER_OFFSET + loop * 4); in starfive_rsa_cpu_start()
196 for (loop = key->bitlen - 1; loop > 0; loop--) { in starfive_rsa_cpu_start()
197 mlen = starfive_rsa_get_nbit(de, loop - 1, key_sz); in starfive_rsa_cpu_start()
229 for (loop = 0; loop <= opsize; loop++) { in starfive_rsa_cpu_start()
230 temp = readl(cryp->base + STARFIVE_PKA_CAAR_OFFSET + 0x4 * loop); in starfive_rsa_cpu_start()
231 result[opsize - loop] = temp; in starfive_rsa_cpu_start()
384 int loop; in starfive_rsa_set_e() local
401 for (loop = 8; loop > 0; loop--) { in starfive_rsa_set_e()
402 if (pt >> (loop - 1)) in starfive_rsa_set_e()
406 rsa_key->e_bitlen = (vlen - 1) * 8 + loop; in starfive_rsa_set_e()
418 int loop; in starfive_rsa_set_d() local
436 for (loop = 8; loop > 0; loop--) { in starfive_rsa_set_d()
437 if (pt >> (loop - 1)) in starfive_rsa_set_d()
441 rsa_key->d_bitlen = (vlen - 1) * 8 + loop; in starfive_rsa_set_d()