/Linux-v6.6/drivers/crypto/caam/ |
D | blob_gen.c | 34 struct device jrdev; member 67 struct device *jrdev = &priv->jrdev; in caam_process_blob() local 90 dma_in = dma_map_single(jrdev, info->input, info->input_len, in caam_process_blob() 92 if (dma_mapping_error(jrdev, dma_in)) { in caam_process_blob() 93 dev_err(jrdev, "unable to map input DMA buffer\n"); in caam_process_blob() 98 dma_out = dma_map_single(jrdev, info->output, output_len, in caam_process_blob() 100 if (dma_mapping_error(jrdev, dma_out)) { in caam_process_blob() 101 dev_err(jrdev, "unable to map output DMA buffer\n"); in caam_process_blob() 106 ctrlpriv = dev_get_drvdata(jrdev->parent); in caam_process_blob() 109 dev_warn(jrdev, in caam_process_blob() [all …]
|
D | caamhash.c | 107 struct device *jrdev; member 125 void (*ahash_op_done)(struct device *jrdev, u32 *desc, u32 err, 146 static inline int map_seq_out_ptr_ctx(u32 *desc, struct device *jrdev, in map_seq_out_ptr_ctx() argument 151 state->ctx_dma = dma_map_single(jrdev, state->caam_ctx, in map_seq_out_ptr_ctx() 153 if (dma_mapping_error(jrdev, state->ctx_dma)) { in map_seq_out_ptr_ctx() 154 dev_err(jrdev, "unable to map ctx\n"); in map_seq_out_ptr_ctx() 165 static inline int buf_map_to_sec4_sg(struct device *jrdev, in buf_map_to_sec4_sg() argument 174 state->buf_dma = dma_map_single(jrdev, state->buf, buflen, in buf_map_to_sec4_sg() 176 if (dma_mapping_error(jrdev, state->buf_dma)) { in buf_map_to_sec4_sg() 177 dev_err(jrdev, "unable to map buf\n"); in buf_map_to_sec4_sg() [all …]
|
D | caamprng.c | 38 static void caam_prng_done(struct device *jrdev, u32 *desc, u32 err, in caam_prng_done() argument 43 jctx->err = err ? caam_jr_strstatus(jrdev, err) : 0; in caam_prng_done() 82 struct device *jrdev; in caam_prng_generate() local 95 jrdev = caam_jr_alloc(); in caam_prng_generate() 96 ret = PTR_ERR_OR_ZERO(jrdev); in caam_prng_generate() 109 dst_dma = dma_map_single(jrdev, buf, dlen, DMA_FROM_DEVICE); in caam_prng_generate() 110 if (dma_mapping_error(jrdev, dst_dma)) { in caam_prng_generate() 111 dev_err(jrdev, "Failed to map destination buffer memory\n"); in caam_prng_generate() 117 ret = caam_jr_enqueue(jrdev, in caam_prng_generate() 126 dma_unmap_single(jrdev, dst_dma, dlen, DMA_FROM_DEVICE); in caam_prng_generate() [all …]
|
D | error.c | 220 static int report_ccb_status(struct device *jrdev, const u32 status, in report_ccb_status() argument 260 dev_err_ratelimited(jrdev, "%08x: %s: %s %d: %s%s: %s%s\n", status, in report_ccb_status() 267 static int report_jump_status(struct device *jrdev, const u32 status, in report_jump_status() argument 270 dev_err(jrdev, "%08x: %s: %s() not implemented\n", in report_jump_status() 276 static int report_deco_status(struct device *jrdev, const u32 status, in report_deco_status() argument 301 dev_err(jrdev, "%08x: %s: %s %d: %s%s\n", in report_deco_status() 330 static int report_jr_status(struct device *jrdev, const u32 status, in report_jr_status() argument 333 dev_err(jrdev, "%08x: %s: %s() not implemented\n", in report_jr_status() 339 static int report_cond_code_status(struct device *jrdev, const u32 status, in report_cond_code_status() argument 342 dev_err(jrdev, "%08x: %s: %s() not implemented\n", in report_cond_code_status() [all …]
|
D | caamalg.c | 123 struct device *jrdev; member 143 struct device *jrdev = ctx->jrdev; in aead_null_set_sh_desc() local 144 struct caam_drv_private *ctrlpriv = dev_get_drvdata(jrdev->parent); in aead_null_set_sh_desc() 165 dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, in aead_null_set_sh_desc() 184 dma_sync_single_for_device(jrdev, ctx->sh_desc_dec_dma, in aead_null_set_sh_desc() 197 struct device *jrdev = ctx->jrdev; in aead_set_sh_desc() local 198 struct caam_drv_private *ctrlpriv = dev_get_drvdata(jrdev->parent); in aead_set_sh_desc() 268 dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, in aead_set_sh_desc() 290 dma_sync_single_for_device(jrdev, ctx->sh_desc_dec_dma, in aead_set_sh_desc() 314 dma_sync_single_for_device(jrdev, ctx->sh_desc_enc_dma, in aead_set_sh_desc() [all …]
|
D | jr.c | 69 struct device *jrdev = data; in caam_jr_crypto_engine_exit() local 70 struct caam_drv_private_jr *jrpriv = dev_get_drvdata(jrdev); in caam_jr_crypto_engine_exit() 186 struct device *jrdev; in caam_jr_remove() local 189 jrdev = &pdev->dev; in caam_jr_remove() 190 jrpriv = dev_get_drvdata(jrdev); in caam_jr_remove() 193 caam_rng_exit(jrdev->parent); in caam_jr_remove() 199 dev_err(jrdev, "Device is busy\n"); in caam_jr_remove() 212 ret = caam_jr_shutdown(jrdev); in caam_jr_remove() 214 dev_err(jrdev, "Failed to shut down job ring\n"); in caam_jr_remove() 593 struct device *jrdev; in caam_jr_probe() local [all …]
|
D | caamrng.c | 39 struct device *jrdev; member 57 static void caam_rng_done(struct device *jrdev, u32 *desc, u32 err, in caam_rng_done() argument 63 *jctx->err = caam_jr_strstatus(jrdev, err); in caam_rng_done() 84 static int caam_rng_read_one(struct device *jrdev, in caam_rng_read_one() argument 98 dst_dma = dma_map_single(jrdev, dst, len, DMA_FROM_DEVICE); in caam_rng_read_one() 99 if (dma_mapping_error(jrdev, dst_dma)) { in caam_rng_read_one() 100 dev_err(jrdev, "unable to map destination memory\n"); in caam_rng_read_one() 105 err = caam_jr_enqueue(jrdev, in caam_rng_read_one() 113 dma_unmap_single(jrdev, dst_dma, len, DMA_FROM_DEVICE); in caam_rng_read_one() 130 len = caam_rng_read_one(ctx->jrdev, sg_virt(&sg[0]), in caam_rng_fill_async() [all …]
|
D | key_gen.c | 44 int gen_split_key(struct device *jrdev, u8 *key_out, in gen_split_key() argument 59 dev_dbg(jrdev, "split keylen %d split keylen padded %d\n", in gen_split_key() 69 dev_err(jrdev, "unable to allocate key input memory\n"); in gen_split_key() 75 dma_addr = dma_map_single(jrdev, key_out, local_max, DMA_BIDIRECTIONAL); in gen_split_key() 76 if (dma_mapping_error(jrdev, dma_addr)) { in gen_split_key() 77 dev_err(jrdev, "unable to map key memory\n"); in gen_split_key() 110 ret = caam_jr_enqueue(jrdev, desc, split_key_done, &result); in gen_split_key() 121 dma_unmap_single(jrdev, dma_addr, local_max, DMA_BIDIRECTIONAL); in gen_split_key()
|
D | caampkc.c | 382 struct device *jrdev = ctx->dev; in akcipher_do_one_req() local 388 ret = caam_jr_enqueue(jrdev, desc, req_ctx->akcipher_op_done, req); in akcipher_do_one_req() 394 rsa_pub_unmap(jrdev, req_ctx->edesc, req); in akcipher_do_one_req() 395 rsa_io_unmap(jrdev, req_ctx->edesc, req); in akcipher_do_one_req() 667 static int akcipher_enqueue_req(struct device *jrdev, in akcipher_enqueue_req() argument 668 void (*cbk)(struct device *jrdev, u32 *desc, in akcipher_enqueue_req() argument 672 struct caam_drv_private_jr *jrpriv = dev_get_drvdata(jrdev); in akcipher_enqueue_req() 691 ret = caam_jr_enqueue(jrdev, desc, cbk, req); in akcipher_enqueue_req() 696 rsa_priv_f1_unmap(jrdev, edesc, req); in akcipher_enqueue_req() 699 rsa_priv_f2_unmap(jrdev, edesc, req); in akcipher_enqueue_req() [all …]
|
D | caamalg_qi.c | 65 struct device *jrdev; member 98 struct caam_drv_private *ctrlpriv = dev_get_drvdata(ctx->jrdev->parent); in aead_set_sh_desc() 204 struct device *jrdev = ctx->jrdev; in aead_setkey() local 205 struct caam_drv_private *ctrlpriv = dev_get_drvdata(jrdev->parent); in aead_setkey() 212 dev_dbg(jrdev, "keylen %d enckeylen %d authkeylen %d\n", in aead_setkey() 233 dma_sync_single_for_device(jrdev->parent, ctx->key_dma, in aead_setkey() 239 ret = gen_split_key(jrdev, ctx->key, &ctx->adata, keys.authkey, in aead_setkey() 247 dma_sync_single_for_device(jrdev->parent, ctx->key_dma, in aead_setkey() 267 dev_err(jrdev, "driver enc context update failed\n"); in aead_setkey() 276 dev_err(jrdev, "driver dec context update failed\n"); in aead_setkey() [all …]
|
D | error.h | 17 #define caam_jr_strstatus(jrdev, status) caam_strstatus(jrdev, status, false) argument
|
D | key_gen.h | 46 int gen_split_key(struct device *jrdev, u8 *key_out,
|
D | caampkc.h | 114 void (*akcipher_op_done)(struct device *jrdev, u32 *desc, u32 err,
|