summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2017-01-19 15:05:29 +0800
committerAnson Huang <Anson.Huang@nxp.com>2017-06-08 20:59:31 +0800
commit9c97311ffe6e7a6b39e71376dc6c3fbb005af574 (patch)
treed7b71e2494bed60e937b5b749e066ba03f680c09 /drivers/char
parent8486cf6139124b2db85a669d778f593b6aef0482 (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.c4
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)