treewide: mem: Enable MEMTEST via defconfig
[oweals/u-boot.git] / drivers / net / ne2000_base.c
index f6e5eafba58e00d13b3c518a10b4b6ca3825c2d6..a240d06ad45454ea123551a00a7652f5fd0e6eea 100644 (file)
@@ -74,6 +74,7 @@ Add SNMP
 
 #include <common.h>
 #include <command.h>
+#include <env.h>
 #include <net.h>
 #include <malloc.h>
 #include <linux/compiler.h>
@@ -692,16 +693,6 @@ static int ne2k_setup_driver(struct eth_device *dev)
                }
        }
 
-#ifdef CONFIG_DRIVER_NE2000_CCR
-       {
-               vu_char *p = (vu_char *) CONFIG_DRIVER_NE2000_CCR;
-
-               PRINTK("CCR before is %x\n", *p);
-               *p = CONFIG_DRIVER_NE2000_VAL;
-               PRINTK("CCR after is %x\n", *p);
-       }
-#endif
-
        nic.base = (u8 *) CONFIG_DRIVER_NE2000_BASE;
 
        nic.data = nic.base + DP_DATA;
@@ -715,12 +706,12 @@ static int ne2k_setup_driver(struct eth_device *dev)
         * to the MAC address value in the environment, so we do not read
         * it from the prom or eeprom if it is specified in the environment.
         */
-       if (!eth_getenv_enetaddr("ethaddr", dev->enetaddr)) {
+       if (!eth_env_get_enetaddr("ethaddr", dev->enetaddr)) {
                /* If the MAC address is not in the environment, get it: */
                if (!get_prom(dev->enetaddr, nic.base)) /* get MAC from prom */
                        dp83902a_init(dev->enetaddr);   /* fallback: seeprom */
                /* And write it into the environment otherwise eth_write_hwaddr
-                * returns -1 due to eth_getenv_enetaddr_by_index() failing,
+                * returns -1 due to eth_env_get_enetaddr_by_index() failing,
                 * and this causes "Warning: failed to set MAC address", and
                 * cmd_bdinfo has no ethaddr value which it can show: */
                eth_env_set_enetaddr("ethaddr", dev->enetaddr);