[U-Boot] [PATCHv1 2/7] board: ge: bx50v3: unify two switch statements
Sebastian Reichel
sebastian.reichel at collabora.co.uk
Wed Apr 25 14:56:59 UTC 2018
From: Nandor Han <nandor.han at ge.com>
Simplify process_vpd() by unifying the switch statements handling
product specific configurations.
Signed-off-by: Nandor Han <nandor.han at ge.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>
---
board/ge/bx50v3/bx50v3.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c
index 72a2e3304bac..5e84f2e630e3 100644
--- a/board/ge/bx50v3/bx50v3.c
+++ b/board/ge/bx50v3/bx50v3.c
@@ -594,23 +594,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;
--
2.17.0
More information about the U-Boot
mailing list