hwrng: imx-rngc - use automatic seeding
authorMartin Kaiser <martin@kaiser.cx>
Thu, 5 Mar 2020 20:58:21 +0000 (21:58 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 12 Mar 2020 12:00:15 +0000 (23:00 +1100)
commit3acd9ea9331cd56f9769d16211c865d4638fd12d
treecf0b1d3d6814a099a83683e717a0b753e431f2f8
parent47a1f8e8b3637ff5f7806587883d7d94068d9ee8
hwrng: imx-rngc - use automatic seeding

The rngc requires a new seed for its prng after generating 2^20 160-bit
words of random data. At the moment, we seed the prng only once during
initalisation.

Set the rngc to auto seed mode so that it kicks off the internal
reseeding operation when a new seed is required.

Keep the manual calculation of the initial seed when the device is
probed and switch to automatic seeding afterwards.

Reviewed-by: PrasannaKumar Muralidharan <prasannatsmkumar@gmail.com>
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/imx-rngc.c