public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v1 2/3] arm, am335x, siemens: read COMP/ver from factoryset
Date: Tue, 18 Nov 2014 11:51:05 +0100	[thread overview]
Message-ID: <1416307867-32182-3-git-send-email-hs@denx.de> (raw)
In-Reply-To: <1416307867-32182-1-git-send-email-hs@denx.de>

Signed-off-by: Heiko Schocher <hs@denx.de>
---

 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);
-- 
1.8.3.1

  parent reply	other threads:[~2014-11-18 10:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18 10:51 [U-Boot] [PATCH v1 0/3] arm, am335x: siemens board updates Heiko Schocher
2014-11-18 10:51 ` [U-Boot] [PATCH v1 1/3] arm, am335x, siemens: fix factoryset interpretation Heiko Schocher
2014-12-05 14:53   ` [U-Boot] [U-Boot, v1, " Tom Rini
2014-11-18 10:51 ` Heiko Schocher [this message]
2014-12-05 14:53   ` [U-Boot] [U-Boot, v1, 2/3] arm, am335x, siemens: read COMP/ver from factoryset Tom Rini
2014-11-18 10:51 ` [U-Boot] [PATCH v1 3/3] arm, am335x: siemens boards add FIT support Heiko Schocher
2014-12-05 14:53   ` [U-Boot] [U-Boot, v1, " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416307867-32182-3-git-send-email-hs@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox