net: Move enetaddr env access code to env config instead of net config
[oweals/u-boot.git] / board / compulab / cm_t3517 / cm_t3517.c
index b33522ec8bc831de265955aa4b492726036ad202..e4e346077c990b0f9920338c109cfd113b5fa7bc 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <environment.h>
 #include <status_led.h>
 #include <net.h>
 #include <netdev.h>
@@ -89,8 +90,8 @@ int board_init(void)
        /* boot param addr */
        gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100);
 
-#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
-       status_led_set(STATUS_LED_BOOT, STATUS_LED_ON);
+#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
+       status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_ON);
 #endif
 
        cm_t3517_musb_init();
@@ -98,15 +99,24 @@ int board_init(void)
        return 0;
 }
 
+/*
+ * Routine: get_board_rev
+ * Description: read system revision
+ */
+u32 get_board_rev(void)
+{
+       return cl_eeprom_get_board_rev(CONFIG_SYS_I2C_EEPROM_BUS);
+};
+
 int misc_init_r(void)
 {
        cl_print_pcb_info();
-       dieid_num_r();
+       omap_die_id_display();
 
        return 0;
 }
 
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_MMC)
 #define SB_T35_CD_GPIO 144
 #define SB_T35_WP_GPIO 59
 
@@ -159,7 +169,7 @@ static int cm_t3517_handle_mac_address(void)
        unsigned char enetaddr[6];
        int ret;
 
-       ret = eth_getenv_enetaddr("ethaddr", enetaddr);
+       ret = eth_env_get_enetaddr("ethaddr", enetaddr);
        if (ret)
                return 0;
 
@@ -173,7 +183,7 @@ static int cm_t3517_handle_mac_address(void)
        if (!is_valid_ethaddr(enetaddr))
                return -1;
 
-       return eth_setenv_enetaddr("ethaddr", enetaddr);
+       return eth_env_set_enetaddr("ethaddr", enetaddr);
 }
 
 #define SB_T35_ETH_RST_GPIO 164