diff options
author | Peng Fan <peng.fan@nxp.com> | 2017-01-19 15:05:29 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | eb543020cfd868d61e9a0f7e995d30df4183a1f0 (patch) | |
tree | bf8e88ec8271fcb1e8391dc15d8e41acbebeb007 /drivers/char | |
parent | 25c866327775d229671629b385d7a9804247e00e (diff) |
MLK-13783 char: otp: no need to check bank0/bank1 when prog
Bank0/Bank1 are not in ECC mode, so no need to check.
Each bank contains 8 words, so we check (phy_index > 15).
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/fsl_otp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/fsl_otp.c b/drivers/char/fsl_otp.c index 2c0aa4e8278c..ebeb0fc0907d 100644 --- a/drivers/char/fsl_otp.c +++ b/drivers/char/fsl_otp.c @@ -571,8 +571,8 @@ static ssize_t fsl_otp_store(struct kobject *kobj, struct kobj_attribute *attr, mutex_lock(&otp_mutex); - if (fsl_otp->devtype == FSL_OTP_MX7ULP) { - phy_index = fsl_otp_word_physical(fsl_otp, index); + phy_index = fsl_otp_word_physical(fsl_otp, index); + if ((fsl_otp->devtype == FSL_OTP_MX7ULP) && (phy_index > 15)) { fsl_otp->set_otp_timing(); ret = otp_wait_busy(0); if (ret) |