Lines Matching refs:desc
38 static void caam_prng_done(struct device *jrdev, u32 *desc, u32 err, in caam_prng_done() argument
48 static u32 *caam_init_reseed_desc(u32 *desc) in caam_init_reseed_desc() argument
50 init_job_desc(desc, 0); /* + 1 cmd_sz */ in caam_init_reseed_desc()
52 append_operation(desc, OP_TYPE_CLASS1_ALG | OP_ALG_ALGSEL_RNG | in caam_init_reseed_desc()
56 16, 4, desc, desc_bytes(desc), 1); in caam_init_reseed_desc()
58 return desc; in caam_init_reseed_desc()
61 static u32 *caam_init_prng_desc(u32 *desc, dma_addr_t dst_dma, u32 len) in caam_init_prng_desc() argument
63 init_job_desc(desc, 0); /* + 1 cmd_sz */ in caam_init_prng_desc()
65 append_operation(desc, OP_ALG_ALGSEL_RNG | OP_TYPE_CLASS1_ALG); in caam_init_prng_desc()
67 append_fifo_store(desc, dst_dma, in caam_init_prng_desc()
71 16, 4, desc, desc_bytes(desc), 1); in caam_init_prng_desc()
73 return desc; in caam_init_prng_desc()
84 u32 *desc; in caam_prng_generate() local
103 desc = kzalloc(CAAM_PRNG_MAX_DESC_LEN, GFP_KERNEL); in caam_prng_generate()
104 if (!desc) { in caam_prng_generate()
118 caam_init_prng_desc(desc, dst_dma, dlen), in caam_prng_generate()
131 kfree(desc); in caam_prng_generate()
150 u32 *desc; in caam_prng_seed() local
165 desc = kzalloc(CAAM_PRNG_MAX_DESC_LEN, GFP_KERNEL); in caam_prng_seed()
166 if (!desc) { in caam_prng_seed()
173 caam_init_reseed_desc(desc), in caam_prng_seed()
181 kfree(desc); in caam_prng_seed()