mxc_ocotp: Update redundancy banks for mx7ulp B0

On mx7ulp B0, beside bank 0 and 1, the fuse bank 9, 10, 28 are changed to
Redundancy mode not ECC, so they can support to program different bits of
a word in multiple times.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Ye Li 2019-04-17 09:41:20 +00:00 committed by Stefano Babic
parent 702339bdf4
commit 112ad60058

View File

@ -354,6 +354,9 @@ static int prepare_write(struct ocotp_regs **regs, u32 bank, u32 word,
/* Only bank 0 and 1 are redundancy mode, others are ECC mode */ /* Only bank 0 and 1 are redundancy mode, others are ECC mode */
if (bank != 0 && bank != 1) { if (bank != 0 && bank != 1) {
if ((soc_rev() < CHIP_REV_2_0) ||
((soc_rev() >= CHIP_REV_2_0) &&
bank != 9 && bank != 10 && bank != 28)) {
ret = fuse_sense(bank, word, &val); ret = fuse_sense(bank, word, &val);
if (ret) if (ret)
return ret; return ret;
@ -363,6 +366,7 @@ static int prepare_write(struct ocotp_regs **regs, u32 bank, u32 word,
return -EPERM; return -EPERM;
} }
} }
}
#endif #endif
return prepare_access(regs, bank, word, true, caller); return prepare_access(regs, bank, word, true, caller);