From patchwork Tue Nov 18 10:51:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 411967 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id D10901400F4 for ; Tue, 18 Nov 2014 21:51:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 69CC74B635; Tue, 18 Nov 2014 11:51:20 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nkDPCBHzm0it; Tue, 18 Nov 2014 11:51:20 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 976A54B639; Tue, 18 Nov 2014 11:51:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5FFC44B652 for ; Tue, 18 Nov 2014 11:51:15 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W1kCKOwU-WFU for ; Tue, 18 Nov 2014 11:51:15 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from pollux.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by theia.denx.de (Postfix) with ESMTP id 2E5EF4B639 for ; Tue, 18 Nov 2014 11:51:14 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id 0A9F76E9B; Tue, 18 Nov 2014 11:51:13 +0100 (CET) From: Heiko Schocher To: U-Boot Mailing List Date: Tue, 18 Nov 2014 11:51:05 +0100 Message-Id: <1416307867-32182-3-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1416307867-32182-1-git-send-email-hs@denx.de> References: <1416307867-32182-1-git-send-email-hs@denx.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v1 2/3] arm, am335x, siemens: read COMP/ver from factoryset X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Heiko Schocher --- board/siemens/common/factoryset.c | 10 ++++++++++ board/siemens/common/factoryset.h | 1 + 2 files changed, 11 insertions(+) diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index d98e59d..be0091d 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 4d6de10..7667b96 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);