]> git.sur5r.net Git - u-boot/commitdiff
armv8: ls1012ardb: add more board version information
authorYangbo Lu <yangbo.lu@nxp.com>
Fri, 8 Dec 2017 07:35:36 +0000 (15:35 +0800)
committerYork Sun <york.sun@nxp.com>
Thu, 14 Dec 2017 21:08:47 +0000 (13:08 -0800)
Add LS1012ARDB RevC/RevC1/RevC2/RevD/RevE information and
detect it when u-boot starts up.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
board/freescale/ls1012ardb/ls1012ardb.c
include/configs/ls1012ardb.h

index 2f1d63742ac3ec4254a459e9fc31ffc1119ad492..421b0a78617d54d81da19bb2962d13ac2b941c15 100644 (file)
@@ -41,12 +41,32 @@ int checkboard(void)
        }
 
        puts("Version");
-       if ((in1 & SW_REV_MASK) == SW_REV_A)
+       switch (in1 & SW_REV_MASK) {
+       case SW_REV_A:
                puts(": RevA");
-       else if ((in1 & SW_REV_MASK) == SW_REV_B)
+               break;
+       case SW_REV_B:
                puts(": RevB");
-       else
+               break;
+       case SW_REV_C:
+               puts(": RevC");
+               break;
+       case SW_REV_C1:
+               puts(": RevC1");
+               break;
+       case SW_REV_C2:
+               puts(": RevC2");
+               break;
+       case SW_REV_D:
+               puts(": RevD");
+               break;
+       case SW_REV_E:
+               puts(": RevE");
+               break;
+       default:
                puts(": unknown");
+               break;
+       }
 
        printf(", boot from QSPI");
        if ((in1 & SW_BOOT_MASK) == SW_BOOT_EMU)
index d0ceae24f72f63f9007c0979b23c55ead0da6d83..ab139b00dd7083f58f909307d4fd625adde8df64 100644 (file)
 #define SW_REV_MASK            0xF8
 #define SW_REV_A               0xF8
 #define SW_REV_B               0xF0
+#define SW_REV_C               0xE8
+#define SW_REV_C1              0xE0
+#define SW_REV_C2              0xD8
+#define SW_REV_D               0xD0
+#define SW_REV_E               0xC8
 
 /*  MMC  */
 #ifdef CONFIG_MMC