env: Move env_set() to env.h
[oweals/u-boot.git] / board / compulab / cm_t35 / cm_t35.c
index da6709889ad4ba5ffbfeb9b46e4f879102a02ae7..ead470064636e3a2eb43837c6c86e405bdcb82ec 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2011 - 2013 CompuLab, Ltd. <www.compulab.co.il>
  *
@@ -8,11 +9,11 @@
  *     Manikandan Pillai <mani.pillai@ti.com>
  *     Richard Woodruff <r-woodruff2@ti.com>
  *     Syed Mohammed Khasim <x0khasim@ti.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <env.h>
+#include <environment.h>
 #include <status_led.h>
 #include <netdev.h>
 #include <net.h>
@@ -434,7 +435,7 @@ static int handle_mac_address(void)
        unsigned char enetaddr[6];
        int rc;
 
-       rc = eth_getenv_enetaddr("ethaddr", enetaddr);
+       rc = eth_env_get_enetaddr("ethaddr", enetaddr);
        if (rc)
                return 0;
 
@@ -445,13 +446,14 @@ static int handle_mac_address(void)
        if (!is_valid_ethaddr(enetaddr))
                return -1;
 
-       return eth_setenv_enetaddr("ethaddr", enetaddr);
+       return eth_env_set_enetaddr("ethaddr", enetaddr);
 }
 
 /*
  * Routine: board_eth_init
  * Description: initialize module and base-board Ethernet chips
  */
+#define SB_T35_SMC911X_BASE    (CONFIG_SMC911X_BASE + SZ_16M)
 int board_eth_init(bd_t *bis)
 {
        int rc = 0, rc1 = 0;
@@ -460,7 +462,7 @@ int board_eth_init(bd_t *bis)
        if (rc1)
                printf("No MAC address found! ");
 
-       rc1 = cl_omap3_smc911x_init(0, 5, CM_T3X_SMC911X_BASE,
+       rc1 = cl_omap3_smc911x_init(0, 5, CONFIG_SMC911X_BASE,
                                    cm_t3x_reset_net_chip, -EINVAL);
        if (rc1 > 0)
                rc++;