Lines Matching refs:desc
221 static int ccp5_do_cmd(struct ccp5_desc *desc, in ccp5_do_cmd() argument
232 if (CCP5_CMD_SOC(desc)) { in ccp5_do_cmd()
233 CCP5_CMD_IOC(desc) = 1; in ccp5_do_cmd()
234 CCP5_CMD_SOC(desc) = 0; in ccp5_do_cmd()
239 dP = (u32 *)desc; in ccp5_do_cmd()
256 if (CCP5_CMD_IOC(desc)) { in ccp5_do_cmd()
279 struct ccp5_desc desc; in ccp5_perform_aes() local
286 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_aes()
288 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_AES; in ccp5_perform_aes()
290 CCP5_CMD_SOC(&desc) = op->soc; in ccp5_perform_aes()
291 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_aes()
292 CCP5_CMD_INIT(&desc) = op->init; in ccp5_perform_aes()
293 CCP5_CMD_EOM(&desc) = op->eom; in ccp5_perform_aes()
294 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_aes()
302 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_aes()
304 CCP5_CMD_LEN(&desc) = op->src.u.dma.length; in ccp5_perform_aes()
306 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_aes()
307 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_aes()
308 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_aes()
310 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_aes()
311 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_aes()
312 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_aes()
314 CCP5_CMD_KEY_LO(&desc) = lower_32_bits(key_addr); in ccp5_perform_aes()
315 CCP5_CMD_KEY_HI(&desc) = 0; in ccp5_perform_aes()
316 CCP5_CMD_KEY_MEM(&desc) = CCP_MEMTYPE_SB; in ccp5_perform_aes()
317 CCP5_CMD_LSB_ID(&desc) = op->sb_ctx; in ccp5_perform_aes()
319 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_aes()
324 struct ccp5_desc desc; in ccp5_perform_xts_aes() local
331 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_xts_aes()
333 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_XTS_AES_128; in ccp5_perform_xts_aes()
335 CCP5_CMD_SOC(&desc) = op->soc; in ccp5_perform_xts_aes()
336 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_xts_aes()
337 CCP5_CMD_INIT(&desc) = op->init; in ccp5_perform_xts_aes()
338 CCP5_CMD_EOM(&desc) = op->eom; in ccp5_perform_xts_aes()
339 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_xts_aes()
345 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_xts_aes()
347 CCP5_CMD_LEN(&desc) = op->src.u.dma.length; in ccp5_perform_xts_aes()
349 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_xts_aes()
350 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_xts_aes()
351 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_xts_aes()
353 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_xts_aes()
354 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_xts_aes()
355 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_xts_aes()
357 CCP5_CMD_KEY_LO(&desc) = lower_32_bits(key_addr); in ccp5_perform_xts_aes()
358 CCP5_CMD_KEY_HI(&desc) = 0; in ccp5_perform_xts_aes()
359 CCP5_CMD_KEY_MEM(&desc) = CCP_MEMTYPE_SB; in ccp5_perform_xts_aes()
360 CCP5_CMD_LSB_ID(&desc) = op->sb_ctx; in ccp5_perform_xts_aes()
362 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_xts_aes()
367 struct ccp5_desc desc; in ccp5_perform_sha() local
373 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_sha()
375 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_SHA; in ccp5_perform_sha()
377 CCP5_CMD_SOC(&desc) = op->soc; in ccp5_perform_sha()
378 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_sha()
379 CCP5_CMD_INIT(&desc) = 1; in ccp5_perform_sha()
380 CCP5_CMD_EOM(&desc) = op->eom; in ccp5_perform_sha()
381 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_sha()
385 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_sha()
387 CCP5_CMD_LEN(&desc) = op->src.u.dma.length; in ccp5_perform_sha()
389 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_sha()
390 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_sha()
391 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_sha()
393 CCP5_CMD_LSB_ID(&desc) = op->sb_ctx; in ccp5_perform_sha()
396 CCP5_CMD_SHA_LO(&desc) = lower_32_bits(op->u.sha.msg_bits); in ccp5_perform_sha()
397 CCP5_CMD_SHA_HI(&desc) = upper_32_bits(op->u.sha.msg_bits); in ccp5_perform_sha()
399 CCP5_CMD_SHA_LO(&desc) = 0; in ccp5_perform_sha()
400 CCP5_CMD_SHA_HI(&desc) = 0; in ccp5_perform_sha()
403 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_sha()
408 struct ccp5_desc desc; in ccp5_perform_des3() local
415 memset(&desc, 0, sizeof(struct ccp5_desc)); in ccp5_perform_des3()
417 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_DES3; in ccp5_perform_des3()
419 CCP5_CMD_SOC(&desc) = op->soc; in ccp5_perform_des3()
420 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_des3()
421 CCP5_CMD_INIT(&desc) = op->init; in ccp5_perform_des3()
422 CCP5_CMD_EOM(&desc) = op->eom; in ccp5_perform_des3()
423 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_des3()
429 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_des3()
431 CCP5_CMD_LEN(&desc) = op->src.u.dma.length; in ccp5_perform_des3()
433 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_des3()
434 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_des3()
435 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_des3()
437 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_des3()
438 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_des3()
439 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_des3()
441 CCP5_CMD_KEY_LO(&desc) = lower_32_bits(key_addr); in ccp5_perform_des3()
442 CCP5_CMD_KEY_HI(&desc) = 0; in ccp5_perform_des3()
443 CCP5_CMD_KEY_MEM(&desc) = CCP_MEMTYPE_SB; in ccp5_perform_des3()
444 CCP5_CMD_LSB_ID(&desc) = op->sb_ctx; in ccp5_perform_des3()
446 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_des3()
451 struct ccp5_desc desc; in ccp5_perform_rsa() local
457 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_rsa()
459 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_RSA; in ccp5_perform_rsa()
461 CCP5_CMD_SOC(&desc) = op->soc; in ccp5_perform_rsa()
462 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_rsa()
463 CCP5_CMD_INIT(&desc) = 0; in ccp5_perform_rsa()
464 CCP5_CMD_EOM(&desc) = 1; in ccp5_perform_rsa()
465 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_rsa()
469 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_rsa()
471 CCP5_CMD_LEN(&desc) = op->u.rsa.input_len; in ccp5_perform_rsa()
474 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_rsa()
475 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_rsa()
476 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_rsa()
479 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_rsa()
480 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_rsa()
481 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_rsa()
484 CCP5_CMD_KEY_LO(&desc) = ccp_addr_lo(&op->exp.u.dma); in ccp5_perform_rsa()
485 CCP5_CMD_KEY_HI(&desc) = ccp_addr_hi(&op->exp.u.dma); in ccp5_perform_rsa()
486 CCP5_CMD_KEY_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_rsa()
488 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_rsa()
493 struct ccp5_desc desc; in ccp5_perform_passthru() local
501 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_passthru()
503 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_PASSTHRU; in ccp5_perform_passthru()
505 CCP5_CMD_SOC(&desc) = 0; in ccp5_perform_passthru()
506 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_passthru()
507 CCP5_CMD_INIT(&desc) = 0; in ccp5_perform_passthru()
508 CCP5_CMD_EOM(&desc) = op->eom; in ccp5_perform_passthru()
509 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_passthru()
514 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_passthru()
518 CCP5_CMD_LEN(&desc) = saddr->length; in ccp5_perform_passthru()
520 CCP5_CMD_LEN(&desc) = daddr->length; in ccp5_perform_passthru()
523 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_passthru()
524 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_passthru()
525 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_passthru()
528 CCP5_CMD_LSB_ID(&desc) = op->sb_key; in ccp5_perform_passthru()
532 CCP5_CMD_SRC_LO(&desc) = lower_32_bits(key_addr); in ccp5_perform_passthru()
533 CCP5_CMD_SRC_HI(&desc) = 0; in ccp5_perform_passthru()
534 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SB; in ccp5_perform_passthru()
538 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_passthru()
539 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_passthru()
540 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_passthru()
544 CCP5_CMD_DST_LO(&desc) = lower_32_bits(key_addr); in ccp5_perform_passthru()
545 CCP5_CMD_DST_HI(&desc) = 0; in ccp5_perform_passthru()
546 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SB; in ccp5_perform_passthru()
549 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_passthru()
554 struct ccp5_desc desc; in ccp5_perform_ecc() local
560 memset(&desc, 0, Q_DESC_SIZE); in ccp5_perform_ecc()
562 CCP5_CMD_ENGINE(&desc) = CCP_ENGINE_ECC; in ccp5_perform_ecc()
564 CCP5_CMD_SOC(&desc) = 0; in ccp5_perform_ecc()
565 CCP5_CMD_IOC(&desc) = 1; in ccp5_perform_ecc()
566 CCP5_CMD_INIT(&desc) = 0; in ccp5_perform_ecc()
567 CCP5_CMD_EOM(&desc) = 1; in ccp5_perform_ecc()
568 CCP5_CMD_PROT(&desc) = 0; in ccp5_perform_ecc()
572 CCP5_CMD_FUNCTION(&desc) = function.raw; in ccp5_perform_ecc()
574 CCP5_CMD_LEN(&desc) = op->src.u.dma.length; in ccp5_perform_ecc()
576 CCP5_CMD_SRC_LO(&desc) = ccp_addr_lo(&op->src.u.dma); in ccp5_perform_ecc()
577 CCP5_CMD_SRC_HI(&desc) = ccp_addr_hi(&op->src.u.dma); in ccp5_perform_ecc()
578 CCP5_CMD_SRC_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_ecc()
580 CCP5_CMD_DST_LO(&desc) = ccp_addr_lo(&op->dst.u.dma); in ccp5_perform_ecc()
581 CCP5_CMD_DST_HI(&desc) = ccp_addr_hi(&op->dst.u.dma); in ccp5_perform_ecc()
582 CCP5_CMD_DST_MEM(&desc) = CCP_MEMTYPE_SYSTEM; in ccp5_perform_ecc()
584 return ccp5_do_cmd(&desc, op->cmd_q); in ccp5_perform_ecc()