summaryrefslogtreecommitdiff
path: root/board/ge
diff options
context:
space:
mode:
authorSebastian Reichel <sebastian.reichel@collabora.com>2020-12-15 00:41:56 +0100
committerStefano Babic <sbabic@denx.de>2020-12-26 14:56:09 +0100
commitc44d374bef118a07b44a5a5f596569891cfc6d21 (patch)
treee6830c2f8d982b81c1c409453c035234fb164dea /board/ge
parentdb43c0b72d1eb0dcf2778413743fcf355b5632a1 (diff)
board: ge: bx50v3: remove confidx magic numbers
Instead of hardcoding index magic numbers in the board code, also rely on board_fit_config_name_match choosing the right config for the fitImage containing the kernel. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'board/ge')
-rw-r--r--board/ge/bx50v3/bx50v3.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 4754647fb4..a3ae037a82 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -356,15 +356,12 @@ static void process_vpd(struct vpd_cache *vpd)
switch (vpd->product_id) {
case VPD_PRODUCT_B450:
- env_set("confidx", "1");
i210_index = 1;
break;
case VPD_PRODUCT_B650:
- env_set("confidx", "2");
i210_index = 1;
break;
case VPD_PRODUCT_B850:
- env_set("confidx", "3");
i210_index = 2;
break;
}
@@ -554,16 +551,23 @@ int ft_board_setup(void *blob, struct bd_info *bd)
int board_fit_config_name_match(const char *name)
{
+ const char *machine = name;
+
if (!vpd.is_read)
return strcmp(name, "imx6q-bx50v3");
+ if (!strncmp(machine, "Boot ", 5))
+ machine += 5;
+ if (!strncmp(machine, "imx6q-", 6))
+ machine += 6;
+
switch (vpd.product_id) {
case VPD_PRODUCT_B450:
- return strcmp(name, "imx6q-b450v3");
+ return strcasecmp(machine, "b450v3");
case VPD_PRODUCT_B650:
- return strcmp(name, "imx6q-b650v3");
+ return strcasecmp(machine, "b650v3");
case VPD_PRODUCT_B850:
- return strcmp(name, "imx6q-b850v3");
+ return strcasecmp(machine, "b850v3");
default:
return -1;
}