]> git.sur5r.net Git - u-boot/commitdiff
board: ge: bx50v3: unify two switch statements
authorNandor Han <nandor.han@ge.com>
Wed, 25 Apr 2018 14:56:59 +0000 (16:56 +0200)
committerStefano Babic <sbabic@denx.de>
Thu, 17 May 2018 09:54:24 +0000 (11:54 +0200)
Simplify process_vpd() by unifying the switch statements handling
product specific configurations.

Signed-off-by: Nandor Han <nandor.han@ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
board/ge/bx50v3/bx50v3.c

index 9d8d4780cfbbe72674f3be2d8a2424fff0f39666..be6a9fc470c0b4af1c7d855f7c2fe43a6d589174 100644 (file)
@@ -593,23 +593,16 @@ static void process_vpd(struct vpd_cache *vpd)
        switch (vpd->product_id) {
        case VPD_PRODUCT_B450:
                env_set("confidx", "1");
+               i210_index = 0;
+               fec_index = 1;
                break;
        case VPD_PRODUCT_B650:
                env_set("confidx", "2");
-               break;
-       case VPD_PRODUCT_B850:
-               env_set("confidx", "3");
-               break;
-       }
-
-       switch (vpd->product_id) {
-       case VPD_PRODUCT_B450:
-               /* fall thru */
-       case VPD_PRODUCT_B650:
                i210_index = 0;
                fec_index = 1;
                break;
        case VPD_PRODUCT_B850:
+               env_set("confidx", "3");
                i210_index = 1;
                fec_index = 2;
                break;