]> git.sur5r.net Git - u-boot/commitdiff
arm, am335x, siemens: read COMP/ver from factoryset
authorHeiko Schocher <hs@denx.de>
Tue, 18 Nov 2014 10:51:05 +0000 (11:51 +0100)
committerTom Rini <trini@ti.com>
Fri, 5 Dec 2014 02:28:32 +0000 (21:28 -0500)
Signed-off-by: Heiko Schocher <hs@denx.de>
board/siemens/common/factoryset.c
board/siemens/common/factoryset.h

index d98e59d1147613c9b0dd5b48d6c4c19ddac77e1f..be0091d1334cd96db6cc161e29a4510fb5bf5555 100644 (file)
@@ -249,6 +249,16 @@ int factoryset_read_eeprom(int i2c_addr)
                debug("version number: %d\n", factory_dat.version);
        }
 
+       /* Get COMP/ver from factory set if available */
+       if (0 <= get_factory_record_val(cp, size, (uchar *)"COMP",
+                                       (uchar *)"ver",
+                                       factory_dat.comp_version,
+                                       MAX_STRING_LENGTH)) {
+               debug("factoryset COMP/ver: %s\n", factory_dat.comp_version);
+       } else {
+               strcpy((char *)factory_dat.comp_version, "1.0");
+       }
+
        return 0;
 
 err:
index 4d6de10f5237266caada475dc286e0cd281e1024..7667b96b532bf81adf9edba8999b38524801bf22 100644 (file)
@@ -20,6 +20,7 @@ struct factorysetcontainer {
 #endif
        unsigned char serial[MAX_STRING_LENGTH];
        int version;
+       uchar comp_version[MAX_STRING_LENGTH];
 };
 
 int factoryset_read_eeprom(int i2c_addr);