diff mbox series

[v2,07/10] ARM: mvebu: clearfog: print TLV stored product name

Message ID fcd88046810ca3f69fc90d607b206a73ce8d8604.1579522639.git.baruch@tkos.co.il
State Accepted
Commit 7211fa6f5abede5f3f40ebdeaa9d9c14a0829033
Headers show
Series ARM: clearfog: add run-time board detect | expand

Commit Message

Baruch Siach Jan. 20, 2020, 12:20 p.m. UTC
Use the data from EEPROM TLV to display the board identity.

Reviewed-by: Stefan Roese <sr at denx.de>
Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 board/solidrun/clearfog/clearfog.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
index 39a24aa69ae8..8050cca55ab7 100644
--- a/board/solidrun/clearfog/clearfog.c
+++ b/board/solidrun/clearfog/clearfog.c
@@ -156,7 +156,16 @@  int board_init(void)
 
 int checkboard(void)
 {
-	puts("Board: SolidRun ClearFog\n");
+	char *board = "ClearFog";
+
+	cf_read_tlv_data();
+	if (strlen(cf_tlv_data.tlv_product_name[0]) > 0)
+		board = cf_tlv_data.tlv_product_name[0];
+
+	printf("Board: SolidRun %s", board);
+	if (strlen(cf_tlv_data.tlv_product_name[1]) > 0)
+		printf(", %s", cf_tlv_data.tlv_product_name[1]);
+	puts("\n");
 
 	return 0;
 }