From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v1 5/7] toradex: tdx-cfg-block: add carrier board info printing
Date: Mon, 22 Jun 2020 23:27:58 +0300 [thread overview]
Message-ID: <1592857680-637-6-git-send-email-igor.opaniuk@gmail.com> (raw)
In-Reply-To: <1592857680-637-1-git-send-email-igor.opaniuk@gmail.com>
From: Igor Opaniuk <igor.opaniuk@toradex.com>
Add carrier board info printing during boot time:
U-Boot 2020.07-rc4-02435-g1756e05 (Jun 22 2020 - 22:43:59 +0300)
CPU: Freescale i.MX8MMQ rev1.0 at 1200 MHz
....
Carrier: Toradex Verdin Development Board V1.0A, Serial# 10622780
Verdin iMX8MM #
Signed-off-by: Igor Opaniuk <igor.opaniuk@toradex.com>
---
board/toradex/common/tdx-common.c | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index e8de923..7e353b4 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -19,6 +19,12 @@
static char tdx_serial_str[9];
static char tdx_board_rev_str[6];
+#ifdef CONFIG_TDX_CFG_BLOCK_EXTRA
+static char tdx_car_serial_str[9];
+static char tdx_car_rev_str[6];
+static char *tdx_carrier_board_name;
+#endif
+
#ifdef CONFIG_REVISION_TAG
u32 get_board_rev(void)
{
@@ -88,6 +94,28 @@ int show_board_info(void)
toradex_modules[tdx_hw_tag.prodid],
tdx_board_rev_str,
tdx_serial_str);
+#ifdef CONFIG_TDX_CFG_BLOCK_EXTRA
+ if (read_tdx_cfg_block_carrier()) {
+ printf("MISSING TORADEX CARRIER CONFIG BLOCKS\n");
+ try_migrate_tdx_cfg_block_carrier();
+ } else {
+ tdx_carrier_board_name = (char *)
+ toradex_carrier_boards[tdx_car_hw_tag.prodid];
+
+ sprintf(tdx_car_serial_str, "%08u", tdx_car_serial);
+ sprintf(tdx_car_rev_str, "V%1d.%1d%c",
+ tdx_car_hw_tag.ver_major,
+ tdx_car_hw_tag.ver_minor,
+ (char)tdx_car_hw_tag.ver_assembly +
+ 'A');
+
+ env_set("carrier_serial#", tdx_car_serial_str);
+ printf("Carrier: Toradex %s %s, Serial# %s\n",
+ tdx_carrier_board_name,
+ tdx_car_rev_str,
+ tdx_car_serial_str);
+ }
+#endif
}
/*
--
2.7.4
next prev parent reply other threads:[~2020-06-22 20:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-22 20:27 [PATCH v1 0/7] Toradex: EEPROM storage support for Config Block Igor Opaniuk
2020-06-22 20:27 ` [PATCH v1 1/7] toradex: tdx-cfg-block: add EEPROM read/store wrappers Igor Opaniuk
2020-06-22 20:27 ` [PATCH v1 2/7] toradex: tdx-cfg-block: add carrier boards and display adapters Igor Opaniuk
2020-06-22 20:27 ` [PATCH v1 3/7] toradex: tdx-cfg-block: add support for EEPROM Igor Opaniuk
2020-06-22 20:27 ` [PATCH v1 4/7] toradex: tdx-cfg-clock: add migration routine from PID8 Igor Opaniuk
2020-06-22 20:27 ` Igor Opaniuk [this message]
2020-06-22 20:27 ` [PATCH v1 6/7] ARM: dts: imx8mm-verdin: eeprom nodes adjustments Igor Opaniuk
2020-06-22 20:28 ` [PATCH v1 7/7] verdin-imx8mm: add EEPROM support for carrier board Igor Opaniuk
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=1592857680-637-6-git-send-email-igor.opaniuk@gmail.com \
--to=igor.opaniuk@gmail.com \
--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