summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-02-11 18:27:48 -0800
committerSascha Hauer <s.hauer@pengutronix.de>2019-02-12 21:27:30 +0100
commitb53cab812b92f8691089f7765857044aebba461e (patch)
tree6352f2975feff87213c1cc1c89971071a59ce30d /arch
parent13f7692867a2446d8d24e7e7797417bdb6a7511c (diff)
downloadbarebox-b53cab812b92f8691089f7765857044aebba461e.tar.gz
barebox-b53cab812b92f8691089f7765857044aebba461e.tar.xz
ARM: i.MX8MQ: Read only ROM version major
Don't read all 32-bits located at IMX8MQ_ROM_VERSION_*0 since that, besides ROM version major in LSB, willl also contain minor components which we don't account for in the following checks. Change the code to only read LSB instead. This is a port of a vendor U-Boot[1] commit 0377dc881a96b46d858643dfaa5f9ef0dd4acccc ("MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip") [1] https://source.codeaurora.org/external/imx/uboot-imx Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-imx/include/mach/imx8mq.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/include/mach/imx8mq.h b/arch/arm/mach-imx/include/mach/imx8mq.h
index 2a7cf99770..d69ec8145b 100644
--- a/arch/arm/mach-imx/include/mach/imx8mq.h
+++ b/arch/arm/mach-imx/include/mach/imx8mq.h
@@ -30,9 +30,9 @@ static inline int imx8mq_cpu_revision(void)
* For B0 chip, the DIGPROG is not updated, still TO1.0.
* we have to check ROM version further
*/
- rom_version = readl(IOMEM(IMX8MQ_ROM_VERSION_A0));
+ rom_version = readb(IOMEM(IMX8MQ_ROM_VERSION_A0));
if (rom_version != IMX_CHIP_REV_1_0) {
- rom_version = readl(IOMEM(IMX8MQ_ROM_VERSION_B0));
+ rom_version = readb(IOMEM(IMX8MQ_ROM_VERSION_B0));
if (rom_version >= IMX_CHIP_REV_2_0)
revision = IMX_CHIP_REV_2_0;
}