Lines Matching +full:sl3516 +full:- +full:crypto
1 // SPDX-License-Identifier: GPL-2.0
3 * sl3516-ce-rng.c - hardware cryptographic offloader for SL3516 SoC.
7 * This file handle the RNG found in the SL3516 crypto engine
9 #include "sl3516-ce.h"
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()
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()
60 hwrng_unregister(&ce->trng); in sl3516_ce_rng_unregister()