]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: starfive: visionfive2: deprecate mixed-case product ids VF7110a VF7110b
authorE Shattow <e@freeshell.de>
Wed, 3 Sep 2025 02:07:06 +0000 (19:07 -0700)
committerTom Rini <trini@konsulko.com>
Tue, 16 Sep 2025 16:16:54 +0000 (10:16 -0600)
Per recent discussion [1] product IDs VF7110A or VF7110B from EEPROM are
sufficient to select for VisionFive 2 1.2a or VisionFive 2 1.3b boards.
There are no VisionFive 2 products with mixed-case product IDs in EERPOM
so factor out the unnecessary select case conditional.

1: https://lore.kernel.org/u-boot/ZQ2PR01MB1307D97D2C9566B8EE443812E6062@ZQ2PR01MB1307.CHNPR01.prod.partner.outlook.cn/

Signed-off-by: E Shattow <e@freeshell.de>
Reported-by: Hal Feng <hal.feng@starfivetech.com>
board/starfive/visionfive2/spl.c
board/starfive/visionfive2/starfive_visionfive2.c

index 3dfa931b6556aac6c4209239ec236c879627e98f..9dfe0bea5f185948810d1b6e8ef6e05fcf415ca1 100644 (file)
@@ -126,19 +126,11 @@ int board_fit_config_name_match(const char *name)
                    !strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {
                return 0;
        } else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.2a") &&
-                   !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
-               switch (get_pcb_revision_from_eeprom()) {
-               case 'a':
-               case 'A':
-                       return 0;
-               }
+                   !strncmp(get_product_id_from_eeprom(), "VF7110A", 7)) {
+               return 0;
        } else if (!strcmp(name, "starfive/jh7110-starfive-visionfive-2-v1.3b") &&
-                   !strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
-               switch (get_pcb_revision_from_eeprom()) {
-               case 'b':
-               case 'B':
-                       return 0;
-               }
+                   !strncmp(get_product_id_from_eeprom(), "VF7110B", 7)) {
+               return 0;
        }
 
        return -EINVAL;
index bfbb11a2ee73c8f09f7429bfe1095c59d8883bfc..6271974b9c76fa773ec4e2e31e5741c0fcb50168 100644 (file)
@@ -59,20 +59,10 @@ static void set_fdtfile(void)
                fdtfile = "starfive/jh7110-milkv-mars.dtb";
        } else if (!strncmp(get_product_id_from_eeprom(), "STAR64", 6)) {
                fdtfile = "starfive/jh7110-pine64-star64.dtb";
-       } else if (!strncmp(get_product_id_from_eeprom(), "VF7110", 6)) {
-               switch (get_pcb_revision_from_eeprom()) {
-               case 'a':
-               case 'A':
-                       fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
-                       break;
-               case 'b':
-               case 'B':
-                       fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb";
-                       break;
-               default:
-                       log_err("Unknown revision\n");
-                       return;
-               }
+       } else if (!strncmp(get_product_id_from_eeprom(), "VF7110A", 7)) {
+               fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.2a.dtb";
+       } else if (!strncmp(get_product_id_from_eeprom(), "VF7110B", 7)) {
+               fdtfile = "starfive/jh7110-starfive-visionfive-2-v1.3b.dtb";
        } else {
                log_err("Unknown product\n");
                return;