ARM: imx: Improve the soc revision calculation flow
authorBai Ping <ping.bai@nxp.com>
Fri, 2 Feb 2018 08:06:27 +0000 (16:06 +0800)
committerShawn Guo <shawnguo@kernel.org>
Mon, 12 Feb 2018 05:13:02 +0000 (13:13 +0800)
commit261b350367d729bbfdd4aa92a9e48cfd6500b6ba
tree8d12247c71b856fc8a0a9c2b82d16ea6aca6e260
parent49a1a99c530c297aad4e40af8cffa3195f4e1b58
ARM: imx: Improve the soc revision calculation flow

On our i.MX6 SOC, the DIGPROG register is used for representing the
SOC ID and silicon revision. The revision has two part: MAJOR and
MINOR. each is represented in 8 bits in the register.

bits [15:8]: reflect the MAJOR part of the revision;
bits [7:0]: reflect the MINOR part of the revision;

In our linux kernel, the soc revision is represented in 8 bits.
MAJOR part and MINOR each occupy 4 bits.

previous method does NOT take care about the MAJOR part in DIGPROG
register. So reformat the revision read from the HW to be compatible
with the revision format used in kernel.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
Acked-by: Dong Aisheng <aisheng.dong@nxp.com>
Tested-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm/mach-imx/anatop.c