• Home
  • Raw
  • Download

Lines Matching refs:spu

109 	return chan_idx % iproc_priv.spu.num_chan;  in select_channel()
138 struct spu_hw *spu = &iproc_priv.spu; in spu_skcipher_rx_sg_create() local
143 mssg->spu.dst = kcalloc(rx_frag_num, sizeof(struct scatterlist), in spu_skcipher_rx_sg_create()
145 if (!mssg->spu.dst) in spu_skcipher_rx_sg_create()
148 sg = mssg->spu.dst; in spu_skcipher_rx_sg_create()
155 spu->spu_xts_tweak_in_payload()) in spu_skcipher_rx_sg_create()
172 sg_set_buf(sg, rctx->msg_buf.rx_stat, spu->spu_rx_status_len()); in spu_skcipher_rx_sg_create()
201 struct spu_hw *spu = &iproc_priv.spu; in spu_skcipher_tx_sg_create() local
207 mssg->spu.src = kcalloc(tx_frag_num, sizeof(struct scatterlist), in spu_skcipher_tx_sg_create()
209 if (unlikely(!mssg->spu.src)) in spu_skcipher_tx_sg_create()
212 sg = mssg->spu.src; in spu_skcipher_tx_sg_create()
220 spu->spu_xts_tweak_in_payload()) in spu_skcipher_tx_sg_create()
235 stat_len = spu->spu_tx_status_len(); in spu_skcipher_tx_sg_create()
301 struct spu_hw *spu = &iproc_priv.spu; in handle_skcipher_req() local
401 spu->spu_cipher_req_finish(rctx->msg_buf.bcm_spu_req_hdr + BCM_HDR_LEN, in handle_skcipher_req()
407 stat_pad_len = spu->spu_wordalign_padlen(chunksize); in handle_skcipher_req()
413 spu->spu_request_pad(rctx->msg_buf.spu_req_pad, 0, in handle_skcipher_req()
418 spu->spu_dump_msg_hdr(rctx->msg_buf.bcm_spu_req_hdr + BCM_HDR_LEN, in handle_skcipher_req()
436 spu->spu_xts_tweak_in_payload()) in handle_skcipher_req()
446 if (spu->spu_tx_status_len()) in handle_skcipher_req()
450 spu->spu_xts_tweak_in_payload()) in handle_skcipher_req()
472 struct spu_hw *spu = &iproc_priv.spu; in handle_skcipher_resp() local
481 payload_len = spu->spu_payload_length(rctx->msg_buf.spu_resp_hdr); in handle_skcipher_resp()
488 spu->spu_xts_tweak_in_payload() && in handle_skcipher_resp()
532 struct spu_hw *spu = &iproc_priv.spu; in spu_ahash_rx_sg_create() local
536 mssg->spu.dst = kcalloc(rx_frag_num, sizeof(struct scatterlist), in spu_ahash_rx_sg_create()
538 if (!mssg->spu.dst) in spu_ahash_rx_sg_create()
541 sg = mssg->spu.dst; in spu_ahash_rx_sg_create()
553 sg_set_buf(sg, rctx->msg_buf.rx_stat, spu->spu_rx_status_len()); in spu_ahash_rx_sg_create()
586 struct spu_hw *spu = &iproc_priv.spu; in spu_ahash_tx_sg_create() local
591 mssg->spu.src = kcalloc(tx_frag_num, sizeof(struct scatterlist), in spu_ahash_tx_sg_create()
593 if (!mssg->spu.src) in spu_ahash_tx_sg_create()
596 sg = mssg->spu.src; in spu_ahash_tx_sg_create()
619 stat_len = spu->spu_tx_status_len(); in spu_ahash_tx_sg_create()
656 struct spu_hw *spu = &iproc_priv.spu; in handle_ahash_req() local
777 hash_parms.type = spu->spu_hash_type(rctx->total_sent); in handle_ahash_req()
779 digestsize = spu->spu_digest_size(ctx->digestsize, ctx->auth.alg, in handle_ahash_req()
789 hash_parms.pad_len = spu->spu_hash_pad_len(hash_parms.alg, in handle_ahash_req()
820 spu_hdr_len = spu->spu_create_request(rctx->msg_buf.bcm_spu_req_hdr + in handle_ahash_req()
835 data_pad_len = spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, chunksize); in handle_ahash_req()
838 if (spu->spu_tx_status_len()) in handle_ahash_req()
839 stat_pad_len = spu->spu_wordalign_padlen(db_size); in handle_ahash_req()
845 spu->spu_request_pad(rctx->msg_buf.spu_req_pad, data_pad_len, in handle_ahash_req()
851 spu->spu_dump_msg_hdr(rctx->msg_buf.bcm_spu_req_hdr + BCM_HDR_LEN, in handle_ahash_req()
874 if (spu->spu_tx_status_len()) in handle_ahash_req()
947 struct spu_hw *spu = &iproc_priv.spu; in ahash_req_done() local
955 if (spu->spu_type == SPU_TYPE_SPUM) { in ahash_req_done()
1052 struct spu_hw *spu = &iproc_priv.spu; in spu_aead_rx_sg_create() local
1061 data_padlen = spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, in spu_aead_rx_sg_create()
1065 data_padlen = spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, in spu_aead_rx_sg_create()
1067 assoc_buf_len = spu->spu_assoc_resp_len(ctx->cipher.mode, in spu_aead_rx_sg_create()
1074 data_padlen += spu->spu_wordalign_padlen(assoc_buf_len + in spu_aead_rx_sg_create()
1082 mssg->spu.dst = kcalloc(rx_frag_num, sizeof(struct scatterlist), in spu_aead_rx_sg_create()
1084 if (!mssg->spu.dst) in spu_aead_rx_sg_create()
1087 sg = mssg->spu.dst; in spu_aead_rx_sg_create()
1132 sg_set_buf(sg, rctx->msg_buf.rx_stat, spu->spu_rx_status_len()); in spu_aead_rx_sg_create()
1175 struct spu_hw *spu = &iproc_priv.spu; in spu_aead_tx_sg_create() local
1184 mssg->spu.src = kcalloc(tx_frag_num, sizeof(struct scatterlist), in spu_aead_tx_sg_create()
1186 if (!mssg->spu.src) in spu_aead_tx_sg_create()
1189 sg = mssg->spu.src; in spu_aead_tx_sg_create()
1236 stat_len = spu->spu_tx_status_len(); in spu_aead_tx_sg_create()
1263 struct spu_hw *spu = &iproc_priv.spu; in handle_aead_req() local
1356 if (spu->spu_assoc_resp_len(ctx->cipher.mode, in handle_aead_req()
1362 aead_parms.iv_len = spu->spu_aead_ivlen(ctx->cipher.mode, in handle_aead_req()
1369 aead_parms.aad_pad_len = spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, in handle_aead_req()
1373 aead_parms.data_pad_len = spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, in handle_aead_req()
1381 aead_parms.aad_pad_len = spu->spu_gcm_ccm_pad_len( in handle_aead_req()
1391 spu->spu_gcm_ccm_pad_len(ctx->cipher.mode, in handle_aead_req()
1395 spu->spu_ccm_update_iv(digestsize, &cipher_parms, req->assoclen, in handle_aead_req()
1407 aead_parms.data_pad_len = spu->spu_gcm_ccm_pad_len( in handle_aead_req()
1412 aead_parms.data_pad_len = spu->spu_gcm_ccm_pad_len( in handle_aead_req()
1435 spu_hdr_len = spu->spu_create_request(rctx->msg_buf.bcm_spu_req_hdr + in handle_aead_req()
1445 stat_pad_len = spu->spu_wordalign_padlen(db_size); in handle_aead_req()
1452 spu->spu_request_pad(rctx->msg_buf.spu_req_pad, in handle_aead_req()
1458 spu->spu_dump_msg_hdr(rctx->msg_buf.bcm_spu_req_hdr + BCM_HDR_LEN, in handle_aead_req()
1511 if (spu->spu_tx_status_len()) in handle_aead_req()
1533 struct spu_hw *spu = &iproc_priv.spu; in handle_aead_resp() local
1543 payload_len = spu->spu_payload_length(rctx->msg_buf.spu_resp_hdr); in handle_aead_resp()
1596 kfree(mssg->spu.src); in spu_chunk_cleanup()
1597 kfree(mssg->spu.dst); in spu_chunk_cleanup()
1629 struct spu_hw *spu = &iproc_priv.spu; in spu_rx_callback() local
1643 err = spu->spu_status_process(rctx->msg_buf.rx_stat); in spu_rx_callback()
1824 struct spu_hw *spu = &iproc_priv.spu; in skcipher_setkey() local
1862 if (spu->spu_type == SPU_TYPE_SPUM) in skcipher_setkey()
1864 else if (spu->spu_type == SPU_TYPE_SPU2) in skcipher_setkey()
1880 spu->spu_cipher_req_init(ctx->bcm_spu_req_hdr + BCM_HDR_LEN, in skcipher_setkey()
1883 ctx->spu_resp_hdr_len = spu->spu_response_hdr_len(ctx->authkeylen, in skcipher_setkey()
1932 (iproc_priv.spu.spu_type == SPU_TYPE_SPU2)) { in ahash_enqueue()
1963 struct spu_hw *spu = &iproc_priv.spu; in __ahash_init() local
1985 ctx->spu_resp_hdr_len = spu->spu_response_hdr_len(ctx->authkeylen, 0, in __ahash_init()
2006 struct spu_hw *spu = &iproc_priv.spu; in spu_no_incr_hash() local
2008 if (spu->spu_type == SPU_TYPE_SPU2) in spu_no_incr_hash()
2397 if (iproc_priv.spu.spu_type == SPU_TYPE_SPUM) { in ahash_hmac_setkey()
2481 if (iproc_priv.spu.spu_type == SPU_TYPE_SPU2) { in ahash_hmac_digest()
2509 struct spu_hw *spu = &iproc_priv.spu; in aead_need_fallback() local
2530 (spu->spu_type == SPU_TYPE_SPUM) && in aead_need_fallback()
2543 (spu->spu_subtype == SPU_SUBTYPE_SPUM_NSP) && in aead_need_fallback()
2564 if (spu->spu_type == SPU_TYPE_SPUM) in aead_need_fallback()
2761 struct spu_hw *spu = &iproc_priv.spu; in aead_authenc_setkey() local
2837 ctx->spu_resp_hdr_len = spu->spu_response_hdr_len(ctx->authkeylen, in aead_authenc_setkey()
2856 struct spu_hw *spu = &iproc_priv.spu; in aead_gcm_ccm_setkey() local
2905 ctx->spu_resp_hdr_len = spu->spu_response_hdr_len(ctx->authkeylen, in aead_gcm_ccm_setkey()
4186 struct spu_hw *spu = &iproc_priv.spu; in generic_cra_init() local
4196 ctx->max_payload = spu->spu_ctx_max_payload(ctx->cipher.alg, in generic_cra_init()
4321 struct spu_hw *spu = &iproc_priv.spu; in spu_functions_register() local
4325 spu->spu_dump_msg_hdr = spum_dump_msg_hdr; in spu_functions_register()
4326 spu->spu_payload_length = spum_payload_length; in spu_functions_register()
4327 spu->spu_response_hdr_len = spum_response_hdr_len; in spu_functions_register()
4328 spu->spu_hash_pad_len = spum_hash_pad_len; in spu_functions_register()
4329 spu->spu_gcm_ccm_pad_len = spum_gcm_ccm_pad_len; in spu_functions_register()
4330 spu->spu_assoc_resp_len = spum_assoc_resp_len; in spu_functions_register()
4331 spu->spu_aead_ivlen = spum_aead_ivlen; in spu_functions_register()
4332 spu->spu_hash_type = spum_hash_type; in spu_functions_register()
4333 spu->spu_digest_size = spum_digest_size; in spu_functions_register()
4334 spu->spu_create_request = spum_create_request; in spu_functions_register()
4335 spu->spu_cipher_req_init = spum_cipher_req_init; in spu_functions_register()
4336 spu->spu_cipher_req_finish = spum_cipher_req_finish; in spu_functions_register()
4337 spu->spu_request_pad = spum_request_pad; in spu_functions_register()
4338 spu->spu_tx_status_len = spum_tx_status_len; in spu_functions_register()
4339 spu->spu_rx_status_len = spum_rx_status_len; in spu_functions_register()
4340 spu->spu_status_process = spum_status_process; in spu_functions_register()
4341 spu->spu_xts_tweak_in_payload = spum_xts_tweak_in_payload; in spu_functions_register()
4342 spu->spu_ccm_update_iv = spum_ccm_update_iv; in spu_functions_register()
4343 spu->spu_wordalign_padlen = spum_wordalign_padlen; in spu_functions_register()
4345 spu->spu_ctx_max_payload = spum_ns2_ctx_max_payload; in spu_functions_register()
4347 spu->spu_ctx_max_payload = spum_nsp_ctx_max_payload; in spu_functions_register()
4350 spu->spu_dump_msg_hdr = spu2_dump_msg_hdr; in spu_functions_register()
4351 spu->spu_ctx_max_payload = spu2_ctx_max_payload; in spu_functions_register()
4352 spu->spu_payload_length = spu2_payload_length; in spu_functions_register()
4353 spu->spu_response_hdr_len = spu2_response_hdr_len; in spu_functions_register()
4354 spu->spu_hash_pad_len = spu2_hash_pad_len; in spu_functions_register()
4355 spu->spu_gcm_ccm_pad_len = spu2_gcm_ccm_pad_len; in spu_functions_register()
4356 spu->spu_assoc_resp_len = spu2_assoc_resp_len; in spu_functions_register()
4357 spu->spu_aead_ivlen = spu2_aead_ivlen; in spu_functions_register()
4358 spu->spu_hash_type = spu2_hash_type; in spu_functions_register()
4359 spu->spu_digest_size = spu2_digest_size; in spu_functions_register()
4360 spu->spu_create_request = spu2_create_request; in spu_functions_register()
4361 spu->spu_cipher_req_init = spu2_cipher_req_init; in spu_functions_register()
4362 spu->spu_cipher_req_finish = spu2_cipher_req_finish; in spu_functions_register()
4363 spu->spu_request_pad = spu2_request_pad; in spu_functions_register()
4364 spu->spu_tx_status_len = spu2_tx_status_len; in spu_functions_register()
4365 spu->spu_rx_status_len = spu2_rx_status_len; in spu_functions_register()
4366 spu->spu_status_process = spu2_status_process; in spu_functions_register()
4367 spu->spu_xts_tweak_in_payload = spu2_xts_tweak_in_payload; in spu_functions_register()
4368 spu->spu_ccm_update_iv = spu2_ccm_update_iv; in spu_functions_register()
4369 spu->spu_wordalign_padlen = spu2_wordalign_padlen; in spu_functions_register()
4386 iproc_priv.mbox = devm_kcalloc(dev, iproc_priv.spu.num_chan, in spu_mb_init()
4398 for (i = 0; i < iproc_priv.spu.num_chan; i++) { in spu_mb_init()
4412 for (i = 0; i < iproc_priv.spu.num_chan; i++) { in spu_mb_init()
4424 for (i = 0; i < iproc_priv.spu.num_chan; i++) in spu_mb_release()
4435 atomic_set(&iproc_priv.next_chan, (int)iproc_priv.spu.num_chan); in spu_counters_init()
4487 struct spu_hw *spu = &iproc_priv.spu; in spu_register_ahash() local
4494 (spu->spu_type == SPU_TYPE_SPUM)) in spu_register_ahash()
4499 (spu->spu_subtype != SPU_SUBTYPE_SPU2_V2)) in spu_register_ahash()
4668 struct spu_hw *spu = &iproc_priv.spu; in spu_dt_read() local
4675 spu->num_chan = of_count_phandle_with_args(dn, "mboxes", "#mbox-cells"); in spu_dt_read()
4683 spu->spu_type = matched_spu_type->type; in spu_dt_read()
4684 spu->spu_subtype = matched_spu_type->subtype; in spu_dt_read()
4689 spu->reg_vbase[i] = devm_ioremap_resource(dev, spu_ctrl_regs); in spu_dt_read()
4690 if (IS_ERR(spu->reg_vbase[i])) { in spu_dt_read()
4691 err = PTR_ERR(spu->reg_vbase[i]); in spu_dt_read()
4694 spu->reg_vbase[i] = NULL; in spu_dt_read()
4698 spu->num_spu = i; in spu_dt_read()
4699 dev_dbg(dev, "Device has %d SPUs", spu->num_spu); in spu_dt_read()
4707 struct spu_hw *spu = &iproc_priv.spu; in bcm_spu_probe() local
4722 if (spu->spu_type == SPU_TYPE_SPUM) in bcm_spu_probe()
4724 else if (spu->spu_type == SPU_TYPE_SPU2) in bcm_spu_probe()
4727 spu_functions_register(dev, spu->spu_type, spu->spu_subtype); in bcm_spu_probe()