diff options
| author | Andre Wolokita <andre.wolokita@analog.com> | 2015-03-15 21:54:50 -0400 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-17 07:32:05 -0400 |
| commit | 656d7e7ee3f3dae71862054c0893546d261a1ee7 (patch) | |
| tree | 1e4d44fd29e68592f7d7cc254c703a9c9f642007 /drivers | |
| parent | 1a5addfe82d2778fc3651d1f8adbf5ea5b3b0560 (diff) | |
hwrng: omap - Change RNG_CONFIG_REG to RNG_CONTROL_REG in init
omap4_rng_init() checks bit 10 of the RNG_CONFIG_REG to determine whether
the RNG is already running before performing any initiliasation. This is not
the correct register to check, as the enable bit is in RNG_CONFIG_CONTROL.
Read from RNG_CONTROL_REG instead.
Signed-off-by: Andre Wolokita <Andre.Wolokita@analog.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/char/hw_random/omap-rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c index 6af027463b53..8a1432e8bb80 100644 --- a/drivers/char/hw_random/omap-rng.c +++ b/drivers/char/hw_random/omap-rng.c | |||
| @@ -236,7 +236,7 @@ static int omap4_rng_init(struct omap_rng_dev *priv) | |||
| 236 | u32 val; | 236 | u32 val; |
| 237 | 237 | ||
| 238 | /* Return if RNG is already running. */ | 238 | /* Return if RNG is already running. */ |
| 239 | if (omap_rng_read(priv, RNG_CONFIG_REG) & RNG_CONTROL_ENABLE_TRNG_MASK) | 239 | if (omap_rng_read(priv, RNG_CONTROL_REG) & RNG_CONTROL_ENABLE_TRNG_MASK) |
| 240 | return 0; | 240 | return 0; |
| 241 | 241 | ||
| 242 | val = RNG_CONFIG_MIN_REFIL_CYCLES << RNG_CONFIG_MIN_REFIL_CYCLES_SHIFT; | 242 | val = RNG_CONFIG_MIN_REFIL_CYCLES << RNG_CONFIG_MIN_REFIL_CYCLES_SHIFT; |
