]> git.sur5r.net Git - u-boot/blobdiff - board/compulab/cm_t35/cm_t35.c
net: Move enetaddr env access code to env config instead of net config
[u-boot] / board / compulab / cm_t35 / cm_t35.c
index c4ea8ea875f533f21a4d0bec13bf8795026658b9..e8f604f5db095f4248eea19f6b3ba460ac110c34 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <common.h>
+#include <environment.h>
 #include <status_led.h>
 #include <netdev.h>
 #include <net.h>
@@ -24,7 +25,7 @@
 #include <linux/compiler.h>
 
 #include <asm/io.h>
-#include <asm/errno.h>
+#include <linux/errno.h>
 #include <asm/arch/mem.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/mmc_host_def.h>
@@ -64,6 +65,7 @@ struct splash_location splash_locations[] = {
        {
                .name = "nand",
                .storage = SPLASH_STORAGE_NAND,
+               .flags = SPLASH_STORAGE_RAW,
                .offset = 0x100000,
        },
 };
@@ -91,8 +93,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
 
        return 0;
@@ -104,13 +106,13 @@ int board_init(void)
  */
 u32 get_board_rev(void)
 {
-       return cl_eeprom_get_board_rev();
+       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;
 }
@@ -371,7 +373,7 @@ void set_muxconf_regs(void)
                cm_t3730_set_muxconf();
 }
 
-#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#if defined(CONFIG_MMC)
 #define SB_T35_WP_GPIO 59
 
 int board_mmc_getcd(struct mmc *mmc)
@@ -390,14 +392,14 @@ int board_mmc_init(bd_t *bis)
 }
 #endif
 
-#if defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 void board_mmc_power_init(void)
 {
        twl4030_power_mmc_init(0);
 }
 #endif
 
-#ifdef CONFIG_SYS_I2C_OMAP34XX
+#ifdef CONFIG_SYS_I2C_OMAP24XX
 /*
  * Routine: reset_net_chip
  * Description: reset the Ethernet controller via TPS65930 GPIO
@@ -433,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;
 
@@ -441,16 +443,17 @@ static int handle_mac_address(void)
        if (rc)
                return rc;
 
-       if (!is_valid_ether_addr(enetaddr))
+       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;
@@ -459,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++;