imx: mx31 use new formula for get_cpu_rev
authorPeng Fan <Peng.Fan@freescale.com>
Thu, 13 Aug 2015 02:55:32 +0000 (10:55 +0800)
committerStefano Babic <sbabic@denx.de>
Wed, 2 Sep 2015 13:29:14 +0000 (15:29 +0200)
Use new formula for get_cpu_rev, since we need to use this formula
to do runtime check for all i.MXes.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
Reviewed-by: Stefano Babic <sbabic@denx.de>
arch/arm/cpu/arm1136/mx31/generic.c
arch/arm/include/asm/arch-mx31/sys_proto.h

index 060d46b82ca02b1bef8b779ab30fa308da421c9b..fe966702fa30ba8feb23cd26c54bc72b85f2fe4b 100644 (file)
@@ -175,7 +175,7 @@ u32 get_cpu_rev(void)
 
        for (i = 0; i < ARRAY_SIZE(mx31_cpu_type); i++)
                if (srev == mx31_cpu_type[i].srev)
-                       return mx31_cpu_type[i].v;
+                       return mx31_cpu_type[i].v | (MXC_CPU_MX31 << 12);
 
        return srev | 0x8000;
 }
index b0dfcba586c4f9b89dc88c0406565fb612679deb..162644284a2af7bb72504cb35be6cdb473f6c6fb 100644 (file)
@@ -8,6 +8,8 @@
 #ifndef _SYS_PROTO_H_
 #define _SYS_PROTO_H_
 
+#include "../arch-imx/cpu.h"
+
 struct mxc_weimcs {
        u32 upper;
        u32 lower;