mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm-rng: Fix PRNG_LFSR_CFG setup
Changes to only configure the LFSR on devices that don't have the prng hardware already setup mistakenly removed the LFSR configuration. Instead, the change is ORing in 1s into the top 16 bits of the register (they're marked as reserved). Restore the original code by masking off the lower 16 bits of the register and filling them with values from the PRNG_LFSR_CFG_CLOCKS define. Change-Id: Idd0df7b49175c211eec5ea778733ae81f5bc8188 Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
This commit is contained in:
parent
4167071fed
commit
80bc028537
1 changed files with 3 additions and 3 deletions
|
@ -127,9 +127,9 @@ static int __devinit msm_rng_enable_hw(struct msm_rng_device *msm_rng_dev)
|
|||
PRNG_HW_ENABLE;
|
||||
/* PRNG H/W is not ON */
|
||||
if (val != PRNG_HW_ENABLE) {
|
||||
val = readl_relaxed(msm_rng_dev->base + PRNG_LFSR_CFG_OFFSET) &
|
||||
PRNG_LFSR_CFG_MASK;
|
||||
val |= PRNG_LFSR_CFG_MASK;
|
||||
val = readl_relaxed(msm_rng_dev->base + PRNG_LFSR_CFG_OFFSET);
|
||||
val &= PRNG_LFSR_CFG_MASK;
|
||||
val |= PRNG_LFSR_CFG_CLOCKS;
|
||||
writel_relaxed(val, msm_rng_dev->base + PRNG_LFSR_CFG_OFFSET);
|
||||
|
||||
/* The PRNG CONFIG register should be first written */
|
||||
|
|
Loading…
Reference in a new issue