From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peng Fan Date: Wed, 17 Apr 2019 09:41:23 +0000 Subject: [U-Boot] [PATCH 2/2] mxc_ocotp: Disable fuse sense for imx8mq B1 In-Reply-To: <20190417095422.5641-1-peng.fan@nxp.com> References: <20190417095422.5641-1-peng.fan@nxp.com> Message-ID: <20190417095422.5641-3-peng.fan@nxp.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de From: Ye Li 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 --- drivers/misc/mxc_ocotp.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/misc/mxc_ocotp.c b/drivers/misc/mxc_ocotp.c index 33ea31135c..1b945e9727 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; -- 2.16.4