summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/mx6/soc.c
diff options
context:
space:
mode:
authorYe Li <ye.li@nxp.com>2016-05-03 14:24:33 +0800
committerYe Li <ye.li@nxp.com>2016-05-03 14:36:07 +0800
commit39ea1ae1f0d68871c070b7db3e67435069c21254 (patch)
tree60b371c48e65dc8f2d5324ba5b16d43e4695a857 /arch/arm/cpu/armv7/mx6/soc.c
parent0a4b78f3b376aaede9d693bcf8aba359390cab27 (diff)
downloadu-boot-imx-39ea1ae1f0d68871c070b7db3e67435069c21254.zip
u-boot-imx-39ea1ae1f0d68871c070b7db3e67435069c21254.tar.gz
u-boot-imx-39ea1ae1f0d68871c070b7db3e67435069c21254.tar.bz2
MLK-12737 mx6qp/mx6dp: Fix runtime CPU type checking issue
2016 u-boot added dummy CPU types for the i.MX6QP and i.MX6DP. When doing runtime cpu type checking, we can't use CPU type of i.MX6Q and i.MX6D for them more, which is ok in 2015 u-boot. This patch adds the MXC_CPU_MX6QP and MXC_CPU_MX6DP at some places missed to do the checking. Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'arch/arm/cpu/armv7/mx6/soc.c')
-rw-r--r--arch/arm/cpu/armv7/mx6/soc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/mx6/soc.c b/arch/arm/cpu/armv7/mx6/soc.c
index 086904e..1eae50b 100644
--- a/arch/arm/cpu/armv7/mx6/soc.c
+++ b/arch/arm/cpu/armv7/mx6/soc.c
@@ -142,14 +142,16 @@ u32 get_cpu_speed_grade_hz(void)
switch (val) {
/* Valid for IMX6DQ */
case OCOTP_CFG3_SPEED_1P2GHZ:
- if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
+ if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D) ||
+ is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
return 1200000000;
/* Valid for IMX6SX/IMX6SDL/IMX6DQ */
case OCOTP_CFG3_SPEED_1GHZ:
return 996000000;
/* Valid for IMX6DQ */
case OCOTP_CFG3_SPEED_850MHZ:
- if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D))
+ if (is_cpu_type(MXC_CPU_MX6Q) || is_cpu_type(MXC_CPU_MX6D) ||
+ is_cpu_type(MXC_CPU_MX6QP) || is_cpu_type(MXC_CPU_MX6DP))
return 852000000;
/* Valid for IMX6SX/IMX6SDL/IMX6DQ */
case OCOTP_CFG3_SPEED_800MHZ:
@@ -207,6 +209,9 @@ u32 __weak get_board_rev(void)
if (type == MXC_CPU_MX6D)
cpurev = (MXC_CPU_MX6Q) << 12 | (cpurev & 0xFFF);
+ if (type == MXC_CPU_MX6QP || type == MXC_CPU_MX6DP)
+ cpurev = (MXC_CPU_MX6Q) << 12 | ((cpurev + 0x10) & 0xFFF);
+
return cpurev;
}
#endif