]> git.sur5r.net Git - u-boot/blobdiff - board/ti/ti814x/evm.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / board / ti / ti814x / evm.c
index 0b76a7790598849fe4d858bc7c3d7b6ccdc26805..d8ee51b3666b594f6bc12749b94ff4b7c7cfe74c 100644 (file)
@@ -1,15 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * evm.c
  *
  * Board functions for TI814x EVM
  *
  * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
 #include <cpsw.h>
+#include <environment.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
@@ -95,9 +95,9 @@ void sdram_init(void)
 {
        config_dmm(&evm_lisa_map_regs);
 
-       config_ddr(0, 0, &evm_ddr2_data, &evm_ddr2_cctrl_data,
+       config_ddr(0, NULL, &evm_ddr2_data, &evm_ddr2_cctrl_data,
                   &evm_ddr2_emif0_regs, 0);
-       config_ddr(0, 0, &evm_ddr2_data, &evm_ddr2_cctrl_data,
+       config_ddr(0, NULL, &evm_ddr2_data, &evm_ddr2_cctrl_data,
                   &evm_ddr2_emif1_regs, 1);
 }
 #endif
@@ -111,7 +111,7 @@ int board_init(void)
        return 0;
 }
 
-#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_GENERIC_MMC)
+#if defined(CONFIG_MMC)
 int board_mmc_init(bd_t *bis)
 {
        omap_mmc_init(1, 0, 0, -1, -1);
@@ -132,12 +132,12 @@ static struct cpsw_slave_data cpsw_slaves[] = {
        {
                .slave_reg_ofs  = 0x50,
                .sliver_reg_ofs = 0x700,
-               .phy_id         = 1,
+               .phy_addr       = 1,
        },
        {
                .slave_reg_ofs  = 0x90,
                .sliver_reg_ofs = 0x740,
-               .phy_id         = 0,
+               .phy_addr       = 0,
        },
 };
 
@@ -166,7 +166,7 @@ int board_eth_init(bd_t *bis)
        uint8_t mac_addr[6];
        uint32_t mac_hi, mac_lo;
 
-       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);
@@ -178,8 +178,8 @@ int board_eth_init(bd_t *bis)
                mac_addr[4] = mac_lo & 0xFF;
                mac_addr[5] = (mac_lo & 0xFF00) >> 8;
 
-               if (is_valid_ether_addr(mac_addr))
-                       eth_setenv_enetaddr("ethaddr", mac_addr);
+               if (is_valid_ethaddr(mac_addr))
+                       eth_env_set_enetaddr("ethaddr", mac_addr);
                else
                        printf("Unable to read MAC address. Set <ethaddr>\n");
        }