Lines Matching refs:slen
31 ctx->slen = 0; in sun8i_ce_prng_exit()
35 unsigned int slen) in sun8i_ce_prng_seed() argument
39 if (ctx->seed && ctx->slen != slen) { in sun8i_ce_prng_seed()
41 ctx->slen = 0; in sun8i_ce_prng_seed()
45 ctx->seed = kmalloc(slen, GFP_KERNEL | GFP_DMA); in sun8i_ce_prng_seed()
49 memcpy(ctx->seed, seed, slen); in sun8i_ce_prng_seed()
50 ctx->slen = slen; in sun8i_ce_prng_seed()
56 unsigned int slen, u8 *dst, unsigned int dlen) in sun8i_ce_prng_generate() argument
74 if (ctx->slen == 0) { in sun8i_ce_prng_generate()
80 todo = dlen + ctx->slen + PRNG_DATA_SIZE * 2; in sun8i_ce_prng_generate()
90 slen, dlen, todo, todo / PRNG_DATA_SIZE); in sun8i_ce_prng_generate()
97 dma_iv = dma_map_single(ce->dev, ctx->seed, ctx->slen, DMA_TO_DEVICE); in sun8i_ce_prng_generate()
152 dma_unmap_single(ce->dev, dma_iv, ctx->slen, DMA_TO_DEVICE); in sun8i_ce_prng_generate()
156 memcpy(ctx->seed, d + dlen, ctx->slen); in sun8i_ce_prng_generate()