Lines Matching full:rng
34 /* rng per-device context */
36 struct hwrng rng; member
76 print_hex_dump_debug("rng job desc@: ", DUMP_PREFIX_ADDRESS, in caam_init_desc()
145 static int caam_read(struct hwrng *rng, void *dst, size_t max, bool wait) in caam_read() argument
147 struct caam_rng_ctx *ctx = to_caam_rng_ctx(rng); in caam_read()
164 static void caam_cleanup(struct hwrng *rng) in caam_cleanup() argument
166 struct caam_rng_ctx *ctx = to_caam_rng_ctx(rng); in caam_cleanup()
173 static int caam_init(struct hwrng *rng) in caam_init() argument
175 struct caam_rng_ctx *ctx = to_caam_rng_ctx(rng); in caam_init()
225 /* Check for an instantiated RNG before registration */ in caam_rng_init()
230 rng_inst = rd_reg32(&priv->ctrl->vreg.rng) & CHA_VER_NUM_MASK; in caam_rng_init()
244 ctx->rng.name = "rng-caam"; in caam_rng_init()
245 ctx->rng.init = caam_init; in caam_rng_init()
246 ctx->rng.cleanup = caam_cleanup; in caam_rng_init()
247 ctx->rng.read = caam_read; in caam_rng_init()
248 ctx->rng.priv = (unsigned long)ctx; in caam_rng_init()
249 ctx->rng.quality = 1024; in caam_rng_init()
251 dev_info(ctrldev, "registering rng-caam\n"); in caam_rng_init()
253 ret = devm_hwrng_register(ctrldev, &ctx->rng); in caam_rng_init()