MLK-16266-01 ARM: imx: improve the soc revision calculation flow
authorBai Ping <ping.bai@nxp.com>
Fri, 25 Aug 2017 05:07:27 +0000 (13:07 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:46 +0000 (15:36 -0500)
commita135835e3b9d09638fbb30fd3cafa04c2f258f4e
tree6140515f7ac9680bb94114f61f372d837e335c33
parent9366f2676bfec130646177a4180efcfdf7aad51d
MLK-16266-01 ARM: imx: improve the soc revision calculation flow

On our i.MX6 SOC, the DIGPROG register is used for represent 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 compatible the revision format
used in kernel.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
arch/arm/mach-imx/anatop.c