Lines Matching refs:ce
15 struct sl3516_ce_dev *ce; in sl3516_ce_rng_read() local
20 ce = container_of(rng, struct sl3516_ce_dev, trng); in sl3516_ce_rng_read()
23 ce->hwrng_stat_req++; in sl3516_ce_rng_read()
24 ce->hwrng_stat_bytes += max; in sl3516_ce_rng_read()
27 err = pm_runtime_get_sync(ce->dev); in sl3516_ce_rng_read()
29 pm_runtime_put_noidle(ce->dev); in sl3516_ce_rng_read()
34 *data = readl(ce->base + IPSEC_RAND_NUM_REG); in sl3516_ce_rng_read()
39 pm_runtime_put(ce->dev); in sl3516_ce_rng_read()
44 int sl3516_ce_rng_register(struct sl3516_ce_dev *ce) in sl3516_ce_rng_register() argument
48 ce->trng.name = "SL3516 Crypto Engine RNG"; in sl3516_ce_rng_register()
49 ce->trng.read = sl3516_ce_rng_read; in sl3516_ce_rng_register()
50 ce->trng.quality = 700; in sl3516_ce_rng_register()
52 ret = hwrng_register(&ce->trng); in sl3516_ce_rng_register()
54 dev_err(ce->dev, "Fail to register the RNG\n"); in sl3516_ce_rng_register()
58 void sl3516_ce_rng_unregister(struct sl3516_ce_dev *ce) in sl3516_ce_rng_unregister() argument
60 hwrng_unregister(&ce->trng); in sl3516_ce_rng_unregister()