MLK-16752 imx8mq: Add CPU rev get and use it for ROM_SW_INFO address
authorYe Li <ye.li@nxp.com>
Wed, 1 Nov 2017 10:16:31 +0000 (05:16 -0500)
committerJason Liu <jason.hui.liu@nxp.com>
Thu, 2 Nov 2017 18:37:29 +0000 (02:37 +0800)
commit5d98e3fb6b176b45e931d83c90640dd1b7cc95c1
tree458d2f94a629eb4d89d31eb343aa4e9eee0aae54
parent41e65ffca062b8de527b8d12462d98faa9514908
MLK-16752 imx8mq: Add CPU rev get and use it for ROM_SW_INFO address

Implement the get_cpu_rev function by reading the DIGPROG register
to get the CPU ID. Since this register is not updated for B0,
we need also check ROM version. The ROM version address is different
on B0 (0x83c) and A0 (0x800), so have to check both two.

Additional, the address for ROM_SW_INFO is changed on B0, we have to use
the CPU version to determine the address.

Signed-off-by: Ye Li <ye.li@nxp.com>
arch/arm/cpu/armv8/imx8m/soc.c
arch/arm/include/asm/arch-imx/cpu.h
arch/arm/include/asm/arch-imx8m/imx-regs.h