]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/mx6/soc.c
mx6: Distinguish mx6dual from mx6quad
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / mx6 / soc.c
index 2aad0a15bb90391f715578502312cb19634cf07f..4c5c3672212a8e2d58c1ddddf98e0a7345765a0a 100644 (file)
@@ -41,14 +41,19 @@ u32 get_cpu_rev(void)
 
        if (type != MXC_CPU_MX6SL) {
                reg = readl(&anatop->digprog);
+               struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR;
+               u32 cfg = readl(&scu->config) & 3;
                type = ((reg >> 16) & 0xff);
                if (type == MXC_CPU_MX6DL) {
-                       struct scu_regs *scu = (struct scu_regs *)SCU_BASE_ADDR;
-                       u32 cfg = readl(&scu->config) & 3;
-
                        if (!cfg)
                                type = MXC_CPU_MX6SOLO;
                }
+
+               if (type == MXC_CPU_MX6Q) {
+                       if (cfg == 1)
+                               type = MXC_CPU_MX6D;
+               }
+
        }
        reg &= 0xff;            /* mx6 silicon revision */
        return (type << 12) | (reg + 0x10);
@@ -62,6 +67,9 @@ u32 __weak get_board_rev(void)
        if (type == MXC_CPU_MX6SOLO)
                cpurev = (MXC_CPU_MX6DL) << 12 | (cpurev & 0xFFF);
 
+       if (type == MXC_CPU_MX6D)
+               cpurev = (MXC_CPU_MX6Q) << 12 | (cpurev & 0xFFF);
+
        return cpurev;
 }
 #endif