OSDN Git Service

hwrng: exynos - Fix missing configuration after suspend to RAM
authorKrzysztof Kozlowski <k.kozlowski@samsung.com>
Mon, 19 Oct 2015 04:37:41 +0000 (13:37 +0900)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Oct 2015 14:13:59 +0000 (22:13 +0800)
commitbd1dffb1424682ac5b5849e0998c26dffcd61d9e
tree1abe5913bc55ac3c05da6f9dc15f6a391e80d1b7
parentd7fd6075a205f19cd0c570c8b5badb8c69321d88
hwrng: exynos - Fix missing configuration after suspend to RAM

After suspend to RAM the device stopped to work with ETIMEDOUT error:

$ dd if=/dev/hwrng of=/dev/null bs=1 count=16
dd: reading `/dev/hwrng': Connection timed out

In the STATUS register the bits #5 (PRNG_DONE) and #1
(SEED_SETTING_DONE) were not set. Instead PRNG_ERROR (seventh bit) was
high.

After each system suspend initialize the seed to fix the error.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/char/hw_random/exynos-rng.c