]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: venice: append configuration string to model
authorTim Harvey <tharvey@gateworks.com>
Fri, 23 May 2025 17:20:17 +0000 (10:20 -0700)
committerFabio Estevam <festevam@gmail.com>
Fri, 30 May 2025 22:10:56 +0000 (19:10 -0300)
Append the optional board configuration string to the model info.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
board/gateworks/venice/eeprom.c
board/gateworks/venice/eeprom.h

index 702ab392a047dab5e0bad04a50f96e2057baac73..d9a87193434066f02386858a64e4a7859f26a074 100644 (file)
@@ -449,6 +449,15 @@ int venice_eeprom_init(int quiet)
                                        venice_model[i++] = fsa_info.model[9];
                        }
                }
+
+               /* append extra model info */
+               if (som_info.config[0] >= 32 && som_info.config[0] < 0x7f) {
+                       venice_model[i++] = '-';
+                       strlcpy(venice_model + i, som_info.config, (sizeof(venice_model) - i) - 1);
+                       i += strlen(som_info.config);
+                       if (i >= sizeof(venice_model))
+                               i = sizeof(venice_model) - 1;
+               }
                venice_model[i++] = 0;
        }
 
index 30cd347d9453ff5c277741b927b4c5aea00ebac1..a0f449299aa33843b2eda31ff82ded8114880e3f 100644 (file)
@@ -20,7 +20,7 @@ struct venice_board_info {
        u8 sdram_width; /* 0x2D: (8 << n) bit */
        u8 res3[2];     /* 0x2E */
        char model[16];         /* 0x30: model string */
-       u8 res4[14];    /* 0x40 */
+       u8 config[14];  /* 0x40: model config */
        u8 chksum[2];   /* 0x4E */
 };