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>
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)