Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvell
[oweals/u-boot.git] / board / keymile / common / ivm.c
index dc40a83fc08c247915196a344f1895b0a9739ae1..50df44d1c110e52200cb4301de0186122544d568 100644 (file)
@@ -1,12 +1,12 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2011
  * Holger Brunck, Keymile GmbH Hannover, holger.brunck@keymile.com
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <cli_hush.h>
+#include <env.h>
 #include <i2c.h>
 #include "common.h"
 
@@ -261,7 +261,7 @@ int ivm_analyze_eeprom(unsigned char *buf, int len)
 
        GET_STRING("IVM_Symbol", IVM_POS_SYMBOL_ONLY, 8)
        GET_STRING("IVM_DeviceName", IVM_POS_SHORT_TEXT, 64)
-       tmp = (unsigned char *) getenv("IVM_DeviceName");
+       tmp = (unsigned char *)env_get("IVM_DeviceName");
        if (tmp) {
                int     len = strlen((char *)tmp);
                int     i = 0;
@@ -311,11 +311,6 @@ static int ivm_populate_env(unsigned char *buf, int len)
        /* if an offset is defined, add it */
        process_mac(valbuf, page2, CONFIG_PIGGY_MAC_ADRESS_OFFSET, true);
        env_set((char *)"ethaddr", (char *)valbuf);
-#ifdef CONFIG_KMVECT1
-/* KMVECT1 has two ethernet interfaces */
-       process_mac(valbuf, page2, 1, true);
-       env_set((char *)"eth1addr", (char *)valbuf);
-#endif
 #else
 /* KMTEGR1 has a special setup. eth0 has no connection to the outside and
  * gets an locally administred MAC address, eth1 is the debug interface and