MLK-13776 ocotp: Add fuse word checking before programming it on i.MX7ULP
authorYe Li <ye.li@nxp.com>
Wed, 18 Jan 2017 07:19:55 +0000 (15:19 +0800)
committerYe Li <ye.li@nxp.com>
Wed, 5 Apr 2017 09:24:32 +0000 (17:24 +0800)
commitaef40dc916c57b06efe9c5e900e6be81a33af59a
tree4ba0fcae5834e5b7a1fb198b3ab512b0880aeecd
parent589812f232a7a07873a74e5506153977ce11dce2
MLK-13776 ocotp: Add fuse word checking before programming it on i.MX7ULP

On i.MX7ULP, the fuse words (except bank 0 and 1) only supports to write once,
because they use ECC mode. Multiple writes may damage the ECC value and cause a
wrong fuse value decoded when reading.
This patch adds a checking before the fuse word programming, only can write
when the word value is 0.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e8447d649a631ec98120d84fab124ca29fbe39f0)
drivers/misc/mxc_ocotp.c