mtd: rename CONFIG_NAND -> CONFIG_MTD_RAW_NAND
[platform/kernel/u-boot.git] / board / ti / ti816x / evm.c
index 9d6c3d6..3896ebb 100644 (file)
@@ -1,15 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * evm.c
  *
  * Copyright (C) 2013, Adeneo Embedded <www.adeneo-embedded.com>
  * Antoine Tenart, <atenart@adeneo-embedded.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <env.h>
 #include <spl.h>
-#include <netdev.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clock.h>
@@ -26,7 +25,7 @@ DECLARE_GLOBAL_DATA_PTR;
 int board_init(void)
 {
        gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
-#if defined(CONFIG_NAND)
+#if defined(CONFIG_MTD_RAW_NAND)
        gpmc_init();
 #endif
        return 0;
@@ -38,7 +37,7 @@ int board_eth_init(bd_t *bis)
        uint32_t mac_hi, mac_lo;
        struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
 
-       if (!eth_getenv_enetaddr("ethaddr", mac_addr)) {
+       if (!eth_env_get_enetaddr("ethaddr", mac_addr)) {
                printf("<ethaddr> not set. Reading from E-fuse\n");
                /* try reading mac address from efuse */
                mac_lo = readl(&cdev->macid0l);
@@ -51,12 +50,12 @@ int board_eth_init(bd_t *bis)
                mac_addr[5] = (mac_lo & 0xFF00) >> 8;
 
                if (is_valid_ethaddr(mac_addr))
-                       eth_setenv_enetaddr("ethaddr", mac_addr);
+                       eth_env_set_enetaddr("ethaddr", mac_addr);
                else
                        printf("Unable to read MAC address. Set <ethaddr>\n");
        }
 
-       return davinci_emac_initialize();
+       return 0;
 }
 
 #ifdef CONFIG_SPL_BUILD