From: Heiko Schocher Date: Tue, 18 Nov 2014 10:51:05 +0000 (+0100) Subject: arm, am335x, siemens: read COMP/ver from factoryset X-Git-Tag: v2015.01-rc3~2^2~2 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ac32b9c4db8e9e427584024c93773927644f7f4;p=u-boot arm, am335x, siemens: read COMP/ver from factoryset Signed-off-by: Heiko Schocher --- diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index d98e59d114..be0091d133 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -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: diff --git a/board/siemens/common/factoryset.h b/board/siemens/common/factoryset.h index 4d6de10f52..7667b96b53 100644 --- a/board/siemens/common/factoryset.h +++ b/board/siemens/common/factoryset.h @@ -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);