MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip
authorYe Li <ye.li@nxp.com>
Thu, 6 Sep 2018 06:30:59 +0000 (23:30 -0700)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:36:39 +0000 (02:36 -0700)
commite803d88abdedcdd10eb6c07cbbfda5be22c3c612
treed7749472e3242fa1d983ff9d7b9bdd12d5ecd292
parent4fd58a9c649b6b95cab74398c4d65e6ca9a8bf56
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)
(cherry picked from commit 0377dc881a96b46d858643dfaa5f9ef0dd4acccc)
arch/arm/mach-imx/imx8m/soc.c