]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/mx6/soc.c
arm: mx6: fix cpu_rev calculation
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / mx6 / soc.c
index 784af734a0467af10cd257669201193dea664ead..1db85a1d8a43c21941fb55f22d2e93be5e7bf261 100644 (file)
@@ -116,6 +116,20 @@ u32 get_cpu_rev(void)
                        type = MXC_CPU_MX6DP;
        }
        reg &= 0xff;            /* mx6 silicon revision */
+       if (type == MXC_CPU_MX6Q) {
+               switch (reg) {
+               case 0x02:
+                       break;
+               case 0x05:
+                       reg = 0x03;
+                       break;
+               case 0x06:
+                       reg = 0x06;
+                       break;
+               default:
+                       printf("Unknown CPU Rev.: 0x%02x\n", reg);
+               }
+       }
        return (type << 12) | (reg + (0x10 * (major + 1)));
 }
 
@@ -555,7 +569,7 @@ void enable_caches(void)
 #endif
 
 #if defined(CONFIG_FEC_MXC)
-void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
+__weak void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
 {
        unsigned int mac0, mac1;