diff options
author | Ye Li <ye.li@nxp.com> | 2018-09-05 23:30:59 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-09-05 23:58:39 -0700 |
commit | 0377dc881a96b46d858643dfaa5f9ef0dd4acccc (patch) | |
tree | 3b075acaf0018900489eb072cd44e20422c0499a /arch | |
parent | 7c10aa87f9cc3990577e2fb5ef36e1526761683f (diff) |
MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip
We read the ROM version to determine the CPU revision before B1 chip.
The rom version is 4 bytes word, it has major version at low byte,
minor version at second byte.
On B0.1 chip, the value is 0x1020 not 0x20, if reading the word and comparing
with 0x20, the result is wrong.
Fix the issue by only reading the lowest byte for major version.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 8d0812e63155cca91ecb78c630a450e7d5e5fd00)
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-imx/imx8m/soc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/imx8m/soc.c b/arch/arm/mach-imx/imx8m/soc.c index 2fcbc0b323..e1994dd3cd 100644 --- a/arch/arm/mach-imx/imx8m/soc.c +++ b/arch/arm/mach-imx/imx8m/soc.c @@ -168,9 +168,9 @@ u32 get_cpu_rev(void) /* 0xff0055aa is magic number for B1 */ reg = CHIP_REV_2_1; } else { - rom_version = readl((void __iomem *)ROM_VERSION_A0); + rom_version = readb((void __iomem *)ROM_VERSION_A0); if (rom_version != CHIP_REV_1_0) { - rom_version = readl((void __iomem *)ROM_VERSION_B0); + rom_version = readb((void __iomem *)ROM_VERSION_B0); if (rom_version == CHIP_REV_2_0) reg = CHIP_REV_2_0; } |