Lines Matching refs:u
380 op->src.u.dma.address = src->dm_wa.dma.address; in ccp_prepare_data()
381 op->src.u.dma.offset = 0; in ccp_prepare_data()
382 op->src.u.dma.length = (blocksize_op) ? block_size : cp_len; in ccp_prepare_data()
387 op->src.u.dma.address = sg_dma_address(src->sg_wa.dma_sg); in ccp_prepare_data()
388 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
389 op->src.u.dma.length = op_len & ~(block_size - 1); in ccp_prepare_data()
391 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
401 op->dst.u.dma.address = dst->dm_wa.dma.address; in ccp_prepare_data()
402 op->dst.u.dma.offset = 0; in ccp_prepare_data()
403 op->dst.u.dma.length = op->src.u.dma.length; in ccp_prepare_data()
408 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.dma_sg); in ccp_prepare_data()
409 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
410 op->dst.u.dma.length = op->src.u.dma.length; in ccp_prepare_data()
421 if (op->dst.u.dma.address == dst->dm_wa.dma.address) in ccp_process_data()
425 op->dst.u.dma.length); in ccp_process_data()
444 op.src.u.sb = sb; in ccp_copy_to_from_sb()
446 op.dst.u.dma.address = wa->dma.address; in ccp_copy_to_from_sb()
447 op.dst.u.dma.length = wa->length; in ccp_copy_to_from_sb()
450 op.src.u.dma.address = wa->dma.address; in ccp_copy_to_from_sb()
451 op.src.u.dma.length = wa->length; in ccp_copy_to_from_sb()
453 op.dst.u.sb = sb; in ccp_copy_to_from_sb()
456 op.u.passthru.byte_swap = byte_swap; in ccp_copy_to_from_sb()
478 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_cmac_cmd()
517 op.u.aes.type = aes->type; in ccp_run_aes_cmac_cmd()
518 op.u.aes.mode = aes->mode; in ccp_run_aes_cmac_cmd()
519 op.u.aes.action = aes->action; in ccp_run_aes_cmac_cmd()
634 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_gcm_cmd()
704 op.u.aes.type = aes->type; in ccp_run_aes_gcm_cmd()
755 op.u.aes.mode = CCP_AES_MODE_GHASH; in ccp_run_aes_gcm_cmd()
756 op.u.aes.action = CCP_AES_GHASHAAD; in ccp_run_aes_gcm_cmd()
772 op.u.aes.mode = CCP_AES_MODE_GCTR; in ccp_run_aes_gcm_cmd()
773 op.u.aes.action = aes->action; in ccp_run_aes_gcm_cmd()
805 op.u.aes.size = (nbytes * 8) - 1; in ccp_run_aes_gcm_cmd()
856 op.u.aes.type = aes->type; in ccp_run_aes_gcm_cmd()
857 op.u.aes.mode = CCP_AES_MODE_GHASH; in ccp_run_aes_gcm_cmd()
858 op.u.aes.action = CCP_AES_GHASHFINAL; in ccp_run_aes_gcm_cmd()
860 op.src.u.dma.address = final_wa.dma.address; in ccp_run_aes_gcm_cmd()
861 op.src.u.dma.length = AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
863 op.dst.u.dma.address = final_wa.dma.address; in ccp_run_aes_gcm_cmd()
864 op.dst.u.dma.length = AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
866 op.u.aes.size = 0; in ccp_run_aes_gcm_cmd()
918 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_cmd()
957 op.u.aes.type = aes->type; in ccp_run_aes_cmd()
958 op.u.aes.mode = aes->mode; in ccp_run_aes_cmd()
959 op.u.aes.action = aes->action; in ccp_run_aes_cmd()
1009 op.u.aes.size = AES_BLOCK_SIZE * BITS_PER_BYTE - 1; in ccp_run_aes_cmd()
1012 op.u.aes.size = 0; in ccp_run_aes_cmd()
1095 struct ccp_xts_aes_engine *xts = &cmd->u.xts; in ccp_run_xts_aes_cmd()
1152 op.u.xts.type = aestype; in ccp_run_xts_aes_cmd()
1153 op.u.xts.action = xts->action; in ccp_run_xts_aes_cmd()
1154 op.u.xts.unit_size = xts->unit_size; in ccp_run_xts_aes_cmd()
1295 struct ccp_des3_engine *des3 = &cmd->u.des3; in ccp_run_des3_cmd()
1340 op.u.des3.type = des3->type; in ccp_run_des3_cmd()
1341 op.u.des3.mode = des3->mode; in ccp_run_des3_cmd()
1342 op.u.des3.action = des3->action; in ccp_run_des3_cmd()
1491 struct ccp_sha_engine *sha = &cmd->u.sha; in ccp_run_sha_cmd()
1648 op.u.sha.type = sha->type; in ccp_run_sha_cmd()
1649 op.u.sha.msg_bits = sha->msg_bits; in ccp_run_sha_cmd()
1806 hmac_cmd.u.sha.type = sha->type; in ccp_run_sha_cmd()
1807 hmac_cmd.u.sha.ctx = sha->ctx; in ccp_run_sha_cmd()
1808 hmac_cmd.u.sha.ctx_len = sha->ctx_len; in ccp_run_sha_cmd()
1809 hmac_cmd.u.sha.src = &sg; in ccp_run_sha_cmd()
1810 hmac_cmd.u.sha.src_len = block_size + digest_size; in ccp_run_sha_cmd()
1811 hmac_cmd.u.sha.opad = NULL; in ccp_run_sha_cmd()
1812 hmac_cmd.u.sha.opad_len = 0; in ccp_run_sha_cmd()
1813 hmac_cmd.u.sha.first = 1; in ccp_run_sha_cmd()
1814 hmac_cmd.u.sha.final = 1; in ccp_run_sha_cmd()
1815 hmac_cmd.u.sha.msg_bits = (block_size + digest_size) << 3; in ccp_run_sha_cmd()
1837 struct ccp_rsa_engine *rsa = &cmd->u.rsa; in ccp_run_rsa_cmd()
1907 op.exp.u.dma.address = exp.dma.address; in ccp_run_rsa_cmd()
1908 op.exp.u.dma.offset = 0; in ccp_run_rsa_cmd()
1932 op.src.u.dma.address = src.dma.address; in ccp_run_rsa_cmd()
1933 op.src.u.dma.offset = 0; in ccp_run_rsa_cmd()
1934 op.src.u.dma.length = i_len; in ccp_run_rsa_cmd()
1935 op.dst.u.dma.address = dst.dma.address; in ccp_run_rsa_cmd()
1936 op.dst.u.dma.offset = 0; in ccp_run_rsa_cmd()
1937 op.dst.u.dma.length = o_len; in ccp_run_rsa_cmd()
1939 op.u.rsa.mod_size = rsa->key_size; in ccp_run_rsa_cmd()
1940 op.u.rsa.input_len = i_len; in ccp_run_rsa_cmd()
1969 struct ccp_passthru_engine *pt = &cmd->u.passthru; in ccp_run_passthru_cmd()
2061 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
2062 op.src.u.dma.offset = 0; in ccp_run_passthru_cmd()
2063 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2066 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2067 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
2068 op.dst.u.dma.length = op.src.u.dma.length; in ccp_run_passthru_cmd()
2102 struct ccp_passthru_nomap_engine *pt = &cmd->u.passthru_nomap; in ccp_run_passthru_nomap_cmd()
2147 op.src.u.dma.address = pt->src_dma; in ccp_run_passthru_nomap_cmd()
2148 op.src.u.dma.offset = 0; in ccp_run_passthru_nomap_cmd()
2149 op.src.u.dma.length = pt->src_len; in ccp_run_passthru_nomap_cmd()
2152 op.dst.u.dma.address = pt->dst_dma; in ccp_run_passthru_nomap_cmd()
2153 op.dst.u.dma.offset = 0; in ccp_run_passthru_nomap_cmd()
2154 op.dst.u.dma.length = pt->src_len; in ccp_run_passthru_nomap_cmd()
2165 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_mm_cmd()
2171 if (!ecc->u.mm.operand_1 || in ccp_run_ecc_mm_cmd()
2172 (ecc->u.mm.operand_1_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2176 if (!ecc->u.mm.operand_2 || in ccp_run_ecc_mm_cmd()
2177 (ecc->u.mm.operand_2_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2180 if (!ecc->u.mm.result || in ccp_run_ecc_mm_cmd()
2181 (ecc->u.mm.result_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2210 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_1, 0, in ccp_run_ecc_mm_cmd()
2211 ecc->u.mm.operand_1_len); in ccp_run_ecc_mm_cmd()
2218 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_2, 0, in ccp_run_ecc_mm_cmd()
2219 ecc->u.mm.operand_2_len); in ccp_run_ecc_mm_cmd()
2235 op.src.u.dma.address = src.dma.address; in ccp_run_ecc_mm_cmd()
2236 op.src.u.dma.offset = 0; in ccp_run_ecc_mm_cmd()
2237 op.src.u.dma.length = src.length; in ccp_run_ecc_mm_cmd()
2238 op.dst.u.dma.address = dst.dma.address; in ccp_run_ecc_mm_cmd()
2239 op.dst.u.dma.offset = 0; in ccp_run_ecc_mm_cmd()
2240 op.dst.u.dma.length = dst.length; in ccp_run_ecc_mm_cmd()
2242 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_mm_cmd()
2258 ccp_reverse_get_dm_area(&dst, 0, ecc->u.mm.result, 0, in ccp_run_ecc_mm_cmd()
2272 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_pm_cmd()
2278 if (!ecc->u.pm.point_1.x || in ccp_run_ecc_pm_cmd()
2279 (ecc->u.pm.point_1.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2280 !ecc->u.pm.point_1.y || in ccp_run_ecc_pm_cmd()
2281 (ecc->u.pm.point_1.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2285 if (!ecc->u.pm.point_2.x || in ccp_run_ecc_pm_cmd()
2286 (ecc->u.pm.point_2.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2287 !ecc->u.pm.point_2.y || in ccp_run_ecc_pm_cmd()
2288 (ecc->u.pm.point_2.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2291 if (!ecc->u.pm.domain_a || in ccp_run_ecc_pm_cmd()
2292 (ecc->u.pm.domain_a_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2296 if (!ecc->u.pm.scalar || in ccp_run_ecc_pm_cmd()
2297 (ecc->u.pm.scalar_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2301 if (!ecc->u.pm.result.x || in ccp_run_ecc_pm_cmd()
2302 (ecc->u.pm.result.x_len < CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2303 !ecc->u.pm.result.y || in ccp_run_ecc_pm_cmd()
2304 (ecc->u.pm.result.y_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2333 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.x, 0, in ccp_run_ecc_pm_cmd()
2334 ecc->u.pm.point_1.x_len); in ccp_run_ecc_pm_cmd()
2338 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.y, 0, in ccp_run_ecc_pm_cmd()
2339 ecc->u.pm.point_1.y_len); in ccp_run_ecc_pm_cmd()
2350 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.x, 0, in ccp_run_ecc_pm_cmd()
2351 ecc->u.pm.point_2.x_len); in ccp_run_ecc_pm_cmd()
2355 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.y, 0, in ccp_run_ecc_pm_cmd()
2356 ecc->u.pm.point_2.y_len); in ccp_run_ecc_pm_cmd()
2366 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.domain_a, 0, in ccp_run_ecc_pm_cmd()
2367 ecc->u.pm.domain_a_len); in ccp_run_ecc_pm_cmd()
2375 ecc->u.pm.scalar, 0, in ccp_run_ecc_pm_cmd()
2376 ecc->u.pm.scalar_len); in ccp_run_ecc_pm_cmd()
2393 op.src.u.dma.address = src.dma.address; in ccp_run_ecc_pm_cmd()
2394 op.src.u.dma.offset = 0; in ccp_run_ecc_pm_cmd()
2395 op.src.u.dma.length = src.length; in ccp_run_ecc_pm_cmd()
2396 op.dst.u.dma.address = dst.dma.address; in ccp_run_ecc_pm_cmd()
2397 op.dst.u.dma.offset = 0; in ccp_run_ecc_pm_cmd()
2398 op.dst.u.dma.length = dst.length; in ccp_run_ecc_pm_cmd()
2400 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_pm_cmd()
2421 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.x, 0, in ccp_run_ecc_pm_cmd()
2424 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.y, 0, in ccp_run_ecc_pm_cmd()
2443 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_cmd()
2478 switch (cmd->u.aes.mode) { in ccp_run_cmd()