From: Ye Li Date: Wed, 17 Apr 2019 09:41:23 +0000 (+0000) Subject: mxc_ocotp: Disable fuse sense for imx8mq B1 X-Git-Tag: v2019.07-rc2~30^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b3cf86c86bf00d7d3ee9bc7ecb0819105b641c89;p=platform%2Fkernel%2Fu-boot.git mxc_ocotp: Disable fuse sense for imx8mq B1 On iMX8MQ Rev B1, reading from fuse box is not allowed. The OCOTP_READ_FUSE_DATA register is tied to magic number 0xff0055aa for chip rev. So u-boot has to disable the fuse sense function for it. Signed-off-by: Ye Li Tested-by: Anson Huang Signed-off-by: Peng Fan --- diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c index 33ea311..1b945e9 100644 --- a/drivers/misc/mxc_ocotp.c +++ b/drivers/misc/mxc_ocotp.c @@ -321,6 +321,11 @@ int fuse_sense(u32 bank, u32 word, u32 *val) struct ocotp_regs *regs; int ret; + if (is_imx8mq() && is_soc_rev(CHIP_REV_2_1)) { + printf("mxc_ocotp %s(): fuse sense is disabled\n", __func__); + return -EPERM; + } + ret = prepare_read(®s, bank, word, val, __func__); if (ret) return ret;