hwrng: stm32 - set default random quality
authorLionel Debieve <lionel.debieve@st.com>
Mon, 1 Apr 2019 10:30:46 +0000 (12:30 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 15 Apr 2019 09:35:10 +0000 (17:35 +0800)
Add a default quality to hw_random device to be
automatically set as new default entropy. Setting
random quality will decrease the crng init time by
switching to this hardware random source.

Signed-off-by: Lionel Debieve <lionel.debieve@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/stm32-rng.c

index 37b338a76ba4670a583260555573f27937fac1ae..0ef5b6a3f5605463081657b73b608c1862ec0b96 100644 (file)
@@ -161,6 +161,7 @@ static int stm32_rng_probe(struct platform_device *ofdev)
 #endif
        priv->rng.read = stm32_rng_read,
        priv->rng.priv = (unsigned long) dev;
+       priv->rng.quality = 900;
 
        pm_runtime_set_autosuspend_delay(dev, 100);
        pm_runtime_use_autosuspend(dev);