]> Git Repo - J-u-boot.git/blobdiff - board/ge/bx50v3/bx50v3.c
board: ge: bx50v3: remove confidx magic numbers
[J-u-boot.git] / board / ge / bx50v3 / bx50v3.c
index 4754647fb4adb4ea28b7222e9595a70cc8a38093..a3ae037a82ef10ca35173a07961611513fedfd60 100644 (file)
@@ -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;
        }
This page took 0.028582 seconds and 4 git commands to generate.