Lines Matching refs:u

377 		op->src.u.dma.address = src->dm_wa.dma.address;  in ccp_prepare_data()
378 op->src.u.dma.offset = 0; in ccp_prepare_data()
379 op->src.u.dma.length = (blocksize_op) ? block_size : cp_len; in ccp_prepare_data()
384 op->src.u.dma.address = sg_dma_address(src->sg_wa.dma_sg); in ccp_prepare_data()
385 op->src.u.dma.offset = src->sg_wa.sg_used; in ccp_prepare_data()
386 op->src.u.dma.length = op_len & ~(block_size - 1); in ccp_prepare_data()
388 ccp_update_sg_workarea(&src->sg_wa, op->src.u.dma.length); in ccp_prepare_data()
398 op->dst.u.dma.address = dst->dm_wa.dma.address; in ccp_prepare_data()
399 op->dst.u.dma.offset = 0; in ccp_prepare_data()
400 op->dst.u.dma.length = op->src.u.dma.length; in ccp_prepare_data()
405 op->dst.u.dma.address = sg_dma_address(dst->sg_wa.dma_sg); in ccp_prepare_data()
406 op->dst.u.dma.offset = dst->sg_wa.sg_used; in ccp_prepare_data()
407 op->dst.u.dma.length = op->src.u.dma.length; in ccp_prepare_data()
418 if (op->dst.u.dma.address == dst->dm_wa.dma.address) in ccp_process_data()
422 op->dst.u.dma.length); in ccp_process_data()
441 op.src.u.sb = sb; in ccp_copy_to_from_sb()
443 op.dst.u.dma.address = wa->dma.address; in ccp_copy_to_from_sb()
444 op.dst.u.dma.length = wa->length; in ccp_copy_to_from_sb()
447 op.src.u.dma.address = wa->dma.address; in ccp_copy_to_from_sb()
448 op.src.u.dma.length = wa->length; in ccp_copy_to_from_sb()
450 op.dst.u.sb = sb; in ccp_copy_to_from_sb()
453 op.u.passthru.byte_swap = byte_swap; in ccp_copy_to_from_sb()
475 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_cmac_cmd()
514 op.u.aes.type = aes->type; in ccp_run_aes_cmac_cmd()
515 op.u.aes.mode = aes->mode; in ccp_run_aes_cmac_cmd()
516 op.u.aes.action = aes->action; in ccp_run_aes_cmac_cmd()
631 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_gcm_cmd()
701 op.u.aes.type = aes->type; in ccp_run_aes_gcm_cmd()
752 op.u.aes.mode = CCP_AES_MODE_GHASH; in ccp_run_aes_gcm_cmd()
753 op.u.aes.action = CCP_AES_GHASHAAD; in ccp_run_aes_gcm_cmd()
769 op.u.aes.mode = CCP_AES_MODE_GCTR; in ccp_run_aes_gcm_cmd()
770 op.u.aes.action = aes->action; in ccp_run_aes_gcm_cmd()
802 op.u.aes.size = (nbytes * 8) - 1; in ccp_run_aes_gcm_cmd()
853 op.u.aes.type = aes->type; in ccp_run_aes_gcm_cmd()
854 op.u.aes.mode = CCP_AES_MODE_GHASH; in ccp_run_aes_gcm_cmd()
855 op.u.aes.action = CCP_AES_GHASHFINAL; in ccp_run_aes_gcm_cmd()
857 op.src.u.dma.address = final_wa.dma.address; in ccp_run_aes_gcm_cmd()
858 op.src.u.dma.length = AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
860 op.dst.u.dma.address = final_wa.dma.address; in ccp_run_aes_gcm_cmd()
861 op.dst.u.dma.length = AES_BLOCK_SIZE; in ccp_run_aes_gcm_cmd()
863 op.u.aes.size = 0; in ccp_run_aes_gcm_cmd()
915 struct ccp_aes_engine *aes = &cmd->u.aes; in ccp_run_aes_cmd()
954 op.u.aes.type = aes->type; in ccp_run_aes_cmd()
955 op.u.aes.mode = aes->mode; in ccp_run_aes_cmd()
956 op.u.aes.action = aes->action; in ccp_run_aes_cmd()
1006 op.u.aes.size = AES_BLOCK_SIZE * BITS_PER_BYTE - 1; in ccp_run_aes_cmd()
1009 op.u.aes.size = 0; in ccp_run_aes_cmd()
1092 struct ccp_xts_aes_engine *xts = &cmd->u.xts; in ccp_run_xts_aes_cmd()
1149 op.u.xts.type = aestype; in ccp_run_xts_aes_cmd()
1150 op.u.xts.action = xts->action; in ccp_run_xts_aes_cmd()
1151 op.u.xts.unit_size = xts->unit_size; in ccp_run_xts_aes_cmd()
1292 struct ccp_des3_engine *des3 = &cmd->u.des3; in ccp_run_des3_cmd()
1337 op.u.des3.type = des3->type; in ccp_run_des3_cmd()
1338 op.u.des3.mode = des3->mode; in ccp_run_des3_cmd()
1339 op.u.des3.action = des3->action; in ccp_run_des3_cmd()
1488 struct ccp_sha_engine *sha = &cmd->u.sha; in ccp_run_sha_cmd()
1645 op.u.sha.type = sha->type; in ccp_run_sha_cmd()
1646 op.u.sha.msg_bits = sha->msg_bits; in ccp_run_sha_cmd()
1803 hmac_cmd.u.sha.type = sha->type; in ccp_run_sha_cmd()
1804 hmac_cmd.u.sha.ctx = sha->ctx; in ccp_run_sha_cmd()
1805 hmac_cmd.u.sha.ctx_len = sha->ctx_len; in ccp_run_sha_cmd()
1806 hmac_cmd.u.sha.src = &sg; in ccp_run_sha_cmd()
1807 hmac_cmd.u.sha.src_len = block_size + digest_size; in ccp_run_sha_cmd()
1808 hmac_cmd.u.sha.opad = NULL; in ccp_run_sha_cmd()
1809 hmac_cmd.u.sha.opad_len = 0; in ccp_run_sha_cmd()
1810 hmac_cmd.u.sha.first = 1; in ccp_run_sha_cmd()
1811 hmac_cmd.u.sha.final = 1; in ccp_run_sha_cmd()
1812 hmac_cmd.u.sha.msg_bits = (block_size + digest_size) << 3; in ccp_run_sha_cmd()
1834 struct ccp_rsa_engine *rsa = &cmd->u.rsa; in ccp_run_rsa_cmd()
1904 op.exp.u.dma.address = exp.dma.address; in ccp_run_rsa_cmd()
1905 op.exp.u.dma.offset = 0; in ccp_run_rsa_cmd()
1929 op.src.u.dma.address = src.dma.address; in ccp_run_rsa_cmd()
1930 op.src.u.dma.offset = 0; in ccp_run_rsa_cmd()
1931 op.src.u.dma.length = i_len; in ccp_run_rsa_cmd()
1932 op.dst.u.dma.address = dst.dma.address; in ccp_run_rsa_cmd()
1933 op.dst.u.dma.offset = 0; in ccp_run_rsa_cmd()
1934 op.dst.u.dma.length = o_len; in ccp_run_rsa_cmd()
1936 op.u.rsa.mod_size = rsa->key_size; in ccp_run_rsa_cmd()
1937 op.u.rsa.input_len = i_len; in ccp_run_rsa_cmd()
1966 struct ccp_passthru_engine *pt = &cmd->u.passthru; in ccp_run_passthru_cmd()
2058 op.src.u.dma.address = sg_dma_address(src.sg_wa.sg); in ccp_run_passthru_cmd()
2059 op.src.u.dma.offset = 0; in ccp_run_passthru_cmd()
2060 op.src.u.dma.length = sg_dma_len(src.sg_wa.sg); in ccp_run_passthru_cmd()
2063 op.dst.u.dma.address = sg_dma_address(dst.sg_wa.sg); in ccp_run_passthru_cmd()
2064 op.dst.u.dma.offset = dst.sg_wa.sg_used; in ccp_run_passthru_cmd()
2065 op.dst.u.dma.length = op.src.u.dma.length; in ccp_run_passthru_cmd()
2099 struct ccp_passthru_nomap_engine *pt = &cmd->u.passthru_nomap; in ccp_run_passthru_nomap_cmd()
2144 op.src.u.dma.address = pt->src_dma; in ccp_run_passthru_nomap_cmd()
2145 op.src.u.dma.offset = 0; in ccp_run_passthru_nomap_cmd()
2146 op.src.u.dma.length = pt->src_len; in ccp_run_passthru_nomap_cmd()
2149 op.dst.u.dma.address = pt->dst_dma; in ccp_run_passthru_nomap_cmd()
2150 op.dst.u.dma.offset = 0; in ccp_run_passthru_nomap_cmd()
2151 op.dst.u.dma.length = pt->src_len; in ccp_run_passthru_nomap_cmd()
2162 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_mm_cmd()
2168 if (!ecc->u.mm.operand_1 || in ccp_run_ecc_mm_cmd()
2169 (ecc->u.mm.operand_1_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2173 if (!ecc->u.mm.operand_2 || in ccp_run_ecc_mm_cmd()
2174 (ecc->u.mm.operand_2_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2177 if (!ecc->u.mm.result || in ccp_run_ecc_mm_cmd()
2178 (ecc->u.mm.result_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_mm_cmd()
2207 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_1, 0, in ccp_run_ecc_mm_cmd()
2208 ecc->u.mm.operand_1_len); in ccp_run_ecc_mm_cmd()
2215 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.mm.operand_2, 0, in ccp_run_ecc_mm_cmd()
2216 ecc->u.mm.operand_2_len); in ccp_run_ecc_mm_cmd()
2232 op.src.u.dma.address = src.dma.address; in ccp_run_ecc_mm_cmd()
2233 op.src.u.dma.offset = 0; in ccp_run_ecc_mm_cmd()
2234 op.src.u.dma.length = src.length; in ccp_run_ecc_mm_cmd()
2235 op.dst.u.dma.address = dst.dma.address; in ccp_run_ecc_mm_cmd()
2236 op.dst.u.dma.offset = 0; in ccp_run_ecc_mm_cmd()
2237 op.dst.u.dma.length = dst.length; in ccp_run_ecc_mm_cmd()
2239 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_mm_cmd()
2255 ccp_reverse_get_dm_area(&dst, 0, ecc->u.mm.result, 0, in ccp_run_ecc_mm_cmd()
2269 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_pm_cmd()
2275 if (!ecc->u.pm.point_1.x || in ccp_run_ecc_pm_cmd()
2276 (ecc->u.pm.point_1.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2277 !ecc->u.pm.point_1.y || in ccp_run_ecc_pm_cmd()
2278 (ecc->u.pm.point_1.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2282 if (!ecc->u.pm.point_2.x || in ccp_run_ecc_pm_cmd()
2283 (ecc->u.pm.point_2.x_len > CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2284 !ecc->u.pm.point_2.y || in ccp_run_ecc_pm_cmd()
2285 (ecc->u.pm.point_2.y_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2288 if (!ecc->u.pm.domain_a || in ccp_run_ecc_pm_cmd()
2289 (ecc->u.pm.domain_a_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2293 if (!ecc->u.pm.scalar || in ccp_run_ecc_pm_cmd()
2294 (ecc->u.pm.scalar_len > CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2298 if (!ecc->u.pm.result.x || in ccp_run_ecc_pm_cmd()
2299 (ecc->u.pm.result.x_len < CCP_ECC_MODULUS_BYTES) || in ccp_run_ecc_pm_cmd()
2300 !ecc->u.pm.result.y || in ccp_run_ecc_pm_cmd()
2301 (ecc->u.pm.result.y_len < CCP_ECC_MODULUS_BYTES)) in ccp_run_ecc_pm_cmd()
2330 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.x, 0, in ccp_run_ecc_pm_cmd()
2331 ecc->u.pm.point_1.x_len); in ccp_run_ecc_pm_cmd()
2335 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_1.y, 0, in ccp_run_ecc_pm_cmd()
2336 ecc->u.pm.point_1.y_len); in ccp_run_ecc_pm_cmd()
2347 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.x, 0, in ccp_run_ecc_pm_cmd()
2348 ecc->u.pm.point_2.x_len); in ccp_run_ecc_pm_cmd()
2352 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.point_2.y, 0, in ccp_run_ecc_pm_cmd()
2353 ecc->u.pm.point_2.y_len); in ccp_run_ecc_pm_cmd()
2363 ret = ccp_reverse_set_dm_area(&src, 0, ecc->u.pm.domain_a, 0, in ccp_run_ecc_pm_cmd()
2364 ecc->u.pm.domain_a_len); in ccp_run_ecc_pm_cmd()
2372 ecc->u.pm.scalar, 0, in ccp_run_ecc_pm_cmd()
2373 ecc->u.pm.scalar_len); in ccp_run_ecc_pm_cmd()
2390 op.src.u.dma.address = src.dma.address; in ccp_run_ecc_pm_cmd()
2391 op.src.u.dma.offset = 0; in ccp_run_ecc_pm_cmd()
2392 op.src.u.dma.length = src.length; in ccp_run_ecc_pm_cmd()
2393 op.dst.u.dma.address = dst.dma.address; in ccp_run_ecc_pm_cmd()
2394 op.dst.u.dma.offset = 0; in ccp_run_ecc_pm_cmd()
2395 op.dst.u.dma.length = dst.length; in ccp_run_ecc_pm_cmd()
2397 op.u.ecc.function = cmd->u.ecc.function; in ccp_run_ecc_pm_cmd()
2418 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.x, 0, in ccp_run_ecc_pm_cmd()
2421 ccp_reverse_get_dm_area(&dst, 0, ecc->u.pm.result.y, 0, in ccp_run_ecc_pm_cmd()
2440 struct ccp_ecc_engine *ecc = &cmd->u.ecc; in ccp_run_ecc_cmd()
2475 switch (cmd->u.aes.mode) { in ccp_run_cmd()