ARM: mvebu: clearfog: print TLV stored product name
authorBaruch Siach <baruch@tkos.co.il>
Mon, 20 Jan 2020 12:20:12 +0000 (14:20 +0200)
committerStefan Roese <sr@denx.de>
Tue, 21 Jan 2020 14:56:15 +0000 (15:56 +0100)
Use the data from EEPROM TLV to display the board identity.

Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
board/solidrun/clearfog/clearfog.c

index 39a24aa69ae87dfeef8b9bbae7b1b55b77bea71c..8050cca55ab76a851f82493c93127049c2a9491c 100644 (file)
@@ -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;
 }