diff options
Diffstat (limited to 'board')
74 files changed, 235 insertions, 193 deletions
diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index ccaa9c6..13f23fd 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -216,7 +216,7 @@ static const char *dtbmacaddr(u32 ifno) node = fdt_path_offset((void *)dtbaddr, path); mac = fdt_getprop((void *)dtbaddr, node, "mac-address", &len); - if (mac && is_valid_ether_addr((u8 *)mac)) + if (mac && is_valid_ethaddr((u8 *)mac)) return mac; return NULL; @@ -595,7 +595,7 @@ int board_eth_init(bd_t *bis) #endif if (!mac) { printf("<ethaddr> not set. validating E-fuse MAC ... "); - if (is_valid_ether_addr((const u8 *)mac_addr)) + if (is_valid_ethaddr((const u8 *)mac_addr)) mac = (const char *)mac_addr; } diff --git a/board/BuS/eb_cpux9k2/cpux9k2.c b/board/BuS/eb_cpux9k2/cpux9k2.c index 76ad7c4..3880a06 100644 --- a/board/BuS/eb_cpux9k2/cpux9k2.c +++ b/board/BuS/eb_cpux9k2/cpux9k2.c @@ -111,7 +111,7 @@ int misc_init_r(void) void reset_phy(void) { udelay(10000); - eth_init(gd->bd); + eth_init(); } #endif diff --git a/board/BuS/vl_ma2sc/vl_ma2sc.c b/board/BuS/vl_ma2sc/vl_ma2sc.c index da39c86..e4e1a85 100644 --- a/board/BuS/vl_ma2sc/vl_ma2sc.c +++ b/board/BuS/vl_ma2sc/vl_ma2sc.c @@ -280,7 +280,7 @@ void reset_phy(void) * Initialize ethernet HW addr prior to starting Linux, * needed for nfsroot */ - eth_init(gd->bd); + eth_init(); #endif } #endif diff --git a/board/ait/cam_enc_4xx/cam_enc_4xx.c b/board/ait/cam_enc_4xx/cam_enc_4xx.c index 290dc19..c5687ba 100644 --- a/board/ait/cam_enc_4xx/cam_enc_4xx.c +++ b/board/ait/cam_enc_4xx/cam_enc_4xx.c @@ -70,7 +70,7 @@ static int cam_enc_4xx_check_network(void) if (!s) return -EINVAL; - if (!is_valid_ether_addr((const u8 *)s)) + if (!is_valid_ethaddr((const u8 *)s)) return -EINVAL; s = getenv("ipaddr"); diff --git a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c index b81a68d..e65befc 100644 --- a/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c +++ b/board/alphaproject/ap_sh4a_4a/ap_sh4a_4a.c @@ -167,7 +167,7 @@ int board_late_init(void) /* Read MAC address */ i2c_read(0x50, 0x0, 0, mac, 6); - if (is_valid_ether_addr(mac)) + if (is_valid_ethaddr(mac)) eth_setenv_enetaddr("ethaddr", mac); return 0; diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig index 46efa7a..ef66ad4 100644 --- a/board/amcc/canyonlands/Kconfig +++ b/board/amcc/canyonlands/Kconfig @@ -33,10 +33,4 @@ config DISPLAY_BOARDINFO bool default y -config DM - default y - -config DM_SERIAL - default y - endif diff --git a/board/atmel/at91sam9261ek/at91sam9261ek.c b/board/atmel/at91sam9261ek/at91sam9261ek.c index a301d72..5250474 100644 --- a/board/atmel/at91sam9261ek/at91sam9261ek.c +++ b/board/atmel/at91sam9261ek/at91sam9261ek.c @@ -275,7 +275,7 @@ void reset_phy(void) * Initialize ethernet HW addr prior to starting Linux, * needed for nfsroot */ - eth_init(gd->bd); + eth_init(); #endif } #endif diff --git a/board/bct-brettl2/bct-brettl2.c b/board/bct-brettl2/bct-brettl2.c index 6be9b18..1f0dfb4 100644 --- a/board/bct-brettl2/bct-brettl2.c +++ b/board/bct-brettl2/bct-brettl2.c @@ -32,7 +32,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf518f-ezbrd/bf518f-ezbrd.c b/board/bf518f-ezbrd/bf518f-ezbrd.c index 3a94a57..8ecfbb2 100644 --- a/board/bf518f-ezbrd/bf518f-ezbrd.c +++ b/board/bf518f-ezbrd/bf518f-ezbrd.c @@ -39,7 +39,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (USE_MAC_IN_FLASH) { /* we cram the MAC in the last flash sector */ uchar *board_mac_addr = (uchar *)0x203F0096; - if (is_valid_ether_addr(board_mac_addr)) { + if (is_valid_ethaddr(board_mac_addr)) { memcpy(mac_addr, board_mac_addr, 6); valid_mac = true; } @@ -47,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf526-ezbrd/bf526-ezbrd.c b/board/bf526-ezbrd/bf526-ezbrd.c index 368d6be..0a88491 100644 --- a/board/bf526-ezbrd/bf526-ezbrd.c +++ b/board/bf526-ezbrd/bf526-ezbrd.c @@ -36,7 +36,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (USE_MAC_IN_FLASH) { /* we cram the MAC in the last flash sector */ uchar *board_mac_addr = (uchar *)0x203F0096; - if (is_valid_ether_addr(board_mac_addr)) { + if (is_valid_ethaddr(board_mac_addr)) { memcpy(mac_addr, board_mac_addr, 6); valid_mac = true; } @@ -44,7 +44,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf527-ezkit/bf527-ezkit.c b/board/bf527-ezkit/bf527-ezkit.c index 88e1869..257775f 100644 --- a/board/bf527-ezkit/bf527-ezkit.c +++ b/board/bf527-ezkit/bf527-ezkit.c @@ -40,13 +40,13 @@ static void board_init_enetaddr(uchar *mac_addr) for (ret = 0; ret < 6; ++ret) mac_addr[ret] = otp_mac_p[5 - ret]; - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) valid_mac = true; } if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf537-minotaur/bf537-minotaur.c b/board/bf537-minotaur/bf537-minotaur.c index ca61ef9..71b4293 100644 --- a/board/bf537-minotaur/bf537-minotaur.c +++ b/board/bf537-minotaur/bf537-minotaur.c @@ -26,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-pnav/bf537-pnav.c b/board/bf537-pnav/bf537-pnav.c index df00110..93522df 100644 --- a/board/bf537-pnav/bf537-pnav.c +++ b/board/bf537-pnav/bf537-pnav.c @@ -26,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-srv1/bf537-srv1.c b/board/bf537-srv1/bf537-srv1.c index 725296a..6581028 100644 --- a/board/bf537-srv1/bf537-srv1.c +++ b/board/bf537-srv1/bf537-srv1.c @@ -26,7 +26,7 @@ int checkboard(void) static void board_init_enetaddr(uchar *mac_addr) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/bf537-stamp/bf537-stamp.c b/board/bf537-stamp/bf537-stamp.c index 32045a9..66e5492 100644 --- a/board/bf537-stamp/bf537-stamp.c +++ b/board/bf537-stamp/bf537-stamp.c @@ -39,7 +39,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (USE_MAC_IN_FLASH) { /* we cram the MAC in the last flash sector */ uchar *board_mac_addr = (uchar *)0x203F0000; - if (is_valid_ether_addr(board_mac_addr)) { + if (is_valid_ethaddr(board_mac_addr)) { memcpy(mac_addr, board_mac_addr, 6); valid_mac = true; } @@ -47,7 +47,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/bf609-ezkit/bf609-ezkit.c b/board/bf609-ezkit/bf609-ezkit.c index 43a4330..86da028 100644 --- a/board/bf609-ezkit/bf609-ezkit.c +++ b/board/bf609-ezkit/bf609-ezkit.c @@ -33,7 +33,7 @@ int board_early_init_f(void) return 0; } -#ifdef CONFIG_DESIGNWARE_ETH +#ifdef CONFIG_ETH_DESIGNWARE int board_eth_init(bd_t *bis) { int ret = 0; diff --git a/board/birdland/bav335x/board.c b/board/birdland/bav335x/board.c index d1e1c8c..32ff7a4 100644 --- a/board/birdland/bav335x/board.c +++ b/board/birdland/bav335x/board.c @@ -384,7 +384,7 @@ int board_eth_init(bd_t *bis) ecode = read_eeprom(&header); /* if we have a valid EE, get mac address from there */ if ((ecode == 0) && - is_valid_ether_addr((const u8 *)&header.mac_addr[0][0])) { + is_valid_ethaddr((const u8 *)&header.mac_addr[0][0])) { memcpy(mac_addr, (const void *)&header.mac_addr[0][0], 6); } @@ -395,7 +395,7 @@ int board_eth_init(bd_t *bis) if (!getenv("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index b0d49c4..487875c 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -232,7 +232,7 @@ static void rescue_mode(void) printf("Entering rescue mode..\n"); #ifdef CONFIG_RANDOM_MACADDR if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { - eth_random_addr(enetaddr); + net_random_ethaddr(enetaddr); if (eth_setenv_enetaddr("ethaddr", enetaddr)) { printf("Failed to set ethernet address\n"); set_led(LED_ALARM_BLINKING); diff --git a/board/cm-bf527/cm-bf527.c b/board/cm-bf527/cm-bf527.c index 1533eb9..2871fa2 100644 --- a/board/cm-bf527/cm-bf527.c +++ b/board/cm-bf527/cm-bf527.c @@ -39,13 +39,13 @@ static void board_init_enetaddr(uchar *mac_addr) for (ret = 0; ret < 6; ++ret) mac_addr[ret] = otp_mac_p[5 - ret]; - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) valid_mac = true; } if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/cm-bf537e/cm-bf537e.c b/board/cm-bf537e/cm-bf537e.c index e79f90f..902611e 100644 --- a/board/cm-bf537e/cm-bf537e.c +++ b/board/cm-bf537e/cm-bf537e.c @@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - eth_random_addr(enetaddr); + net_random_ethaddr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } diff --git a/board/cm-bf537u/cm-bf537u.c b/board/cm-bf537u/cm-bf537u.c index 632cbda..69bffd7 100644 --- a/board/cm-bf537u/cm-bf537u.c +++ b/board/cm-bf537u/cm-bf537u.c @@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - eth_random_addr(enetaddr); + net_random_ethaddr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index ae6945b..7a1bbaf 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -425,7 +425,7 @@ static int handle_mac_address(char *env_var, uint eeprom_bus) if (rc) return rc; - if (!is_valid_ether_addr(enetaddr)) + if (!is_valid_ethaddr(enetaddr)) return -1; return eth_setenv_enetaddr(env_var, enetaddr); diff --git a/board/compulab/cm_t335/Kconfig b/board/compulab/cm_t335/Kconfig index 3a8f304..683efde 100644 --- a/board/compulab/cm_t335/Kconfig +++ b/board/compulab/cm_t335/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "cm_t335" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/compulab/cm_t335/cm_t335.c b/board/compulab/cm_t335/cm_t335.c index 592ef3d..428aee6 100644 --- a/board/compulab/cm_t335/cm_t335.c +++ b/board/compulab/cm_t335/cm_t335.c @@ -114,7 +114,7 @@ static int handle_mac_address(void) if (rv) get_efuse_mac_addr(enetaddr); - if (!is_valid_ether_addr(enetaddr)) + if (!is_valid_ethaddr(enetaddr)) return -1; return eth_setenv_enetaddr("ethaddr", enetaddr); diff --git a/board/compulab/cm_t35/cm_t35.c b/board/compulab/cm_t35/cm_t35.c index c4ea8ea..374edbc 100644 --- a/board/compulab/cm_t35/cm_t35.c +++ b/board/compulab/cm_t35/cm_t35.c @@ -441,7 +441,7 @@ 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); diff --git a/board/compulab/cm_t3517/cm_t3517.c b/board/compulab/cm_t3517/cm_t3517.c index 624cf4c..03b2bad 100644 --- a/board/compulab/cm_t3517/cm_t3517.c +++ b/board/compulab/cm_t3517/cm_t3517.c @@ -132,7 +132,7 @@ static int am3517_get_efuse_enetaddr(u8 *enetaddr) enetaddr[4] = (u8)((lsb >> 8) & 0xff); enetaddr[5] = (u8)(lsb & 0xff); - return is_valid_ether_addr(enetaddr); + return is_valid_ethaddr(enetaddr); } static inline int cm_t3517_init_emac(bd_t *bis) @@ -170,7 +170,7 @@ static int cm_t3517_handle_mac_address(void) return ret; } - if (!is_valid_ether_addr(enetaddr)) + if (!is_valid_ethaddr(enetaddr)) return -1; return eth_setenv_enetaddr("ethaddr", enetaddr); diff --git a/board/compulab/cm_t54/cm_t54.c b/board/compulab/cm_t54/cm_t54.c index fdea909..fad0551 100644 --- a/board/compulab/cm_t54/cm_t54.c +++ b/board/compulab/cm_t54/cm_t54.c @@ -166,10 +166,10 @@ static int handle_mac_address(void) return 0; ret = cl_eeprom_read_mac_addr(enetaddr, CONFIG_SYS_I2C_EEPROM_BUS); - if (ret || !is_valid_ether_addr(enetaddr)) + if (ret || !is_valid_ethaddr(enetaddr)) generate_mac_addr(enetaddr); - if (!is_valid_ether_addr(enetaddr)) + if (!is_valid_ethaddr(enetaddr)) return -1; return eth_setenv_enetaddr("usbethaddr", enetaddr); diff --git a/board/coreboot/coreboot/coreboot.c b/board/coreboot/coreboot/coreboot.c index e076ea6..7110f35 100644 --- a/board/coreboot/coreboot/coreboot.c +++ b/board/coreboot/coreboot/coreboot.c @@ -10,11 +10,6 @@ int arch_early_init_r(void) { -#ifdef CONFIG_CROS_EC - if (cros_ec_board_init()) - return -1; -#endif - return 0; } diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index b9ca38e..b82385a 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -145,7 +145,7 @@ int misc_init_r(void) */ if (!enetaddr_found) { if (!spi_mac_read) { - if (is_valid_ether_addr(buff)) { + if (is_valid_ethaddr(buff)) { if (eth_setenv_enetaddr("ethaddr", buff)) { printf("Warning: Failed to " "set MAC address from SPI flash\n"); @@ -160,8 +160,8 @@ int misc_init_r(void) * MAC address present in environment compare it with * the MAC address in SPI flash and warn on mismatch */ - if (!spi_mac_read && is_valid_ether_addr(buff) && - memcmp(env_enetaddr, buff, 6)) + if (!spi_mac_read && is_valid_ethaddr(buff) && + memcmp(env_enetaddr, buff, 6)) printf("Warning: MAC address in SPI flash don't match " "with the MAC address in the environment\n"); printf("Default using MAC address from environment\n"); diff --git a/board/dnp5370/dnp5370.c b/board/dnp5370/dnp5370.c index df721c9..655fcac 100644 --- a/board/dnp5370/dnp5370.c +++ b/board/dnp5370/dnp5370.c @@ -46,7 +46,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (USE_MAC_IN_FLASH) { /* we cram the MAC in the last flash sector */ uchar *board_mac_addr = (uchar *)0x202F0000; - if (is_valid_ether_addr(board_mac_addr)) { + if (is_valid_ethaddr(board_mac_addr)) { memcpy(mac_addr, board_mac_addr, 6); valid_mac = true; } @@ -54,7 +54,7 @@ static void board_init_enetaddr(uchar *mac_addr) if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/egnite/ethernut5/ethernut5.c b/board/egnite/ethernut5/ethernut5.c index b45213c..67d3984 100644 --- a/board/egnite/ethernut5/ethernut5.c +++ b/board/egnite/ethernut5/ethernut5.c @@ -204,7 +204,7 @@ int board_eth_init(bd_t *bis) miiphy_write(devname, 0, MII_BMCR, BMCR_RESET); } /* Sync environment with network devices, needed for nfsroot. */ - return eth_init(gd->bd); + return eth_init(); } #endif diff --git a/board/genesi/mx51_efikamx/efikamx-usb.c b/board/genesi/mx51_efikamx/efikamx-usb.c index 0b43101..9dfd249 100644 --- a/board/genesi/mx51_efikamx/efikamx-usb.c +++ b/board/genesi/mx51_efikamx/efikamx-usb.c @@ -173,7 +173,9 @@ int board_ehci_hcd_init(int port) return 0; } -void ehci_powerup_fixup(uint32_t *status_reg, uint32_t *reg) +/* This overrides a weak function */ +void mx5_ehci_powerup_fixup(struct ehci_ctrl *ctrl, uint32_t *status_reg, + uint32_t *reg) { uint32_t port = OTG_BASE_ADDR + (0x200 * CONFIG_MXC_USB_PORT); struct usb_ehci *ehci = (struct usb_ehci *)port; diff --git a/board/google/chromebook_link/link.c b/board/google/chromebook_link/link.c index 9978e92..1b97a8f 100644 --- a/board/google/chromebook_link/link.c +++ b/board/google/chromebook_link/link.c @@ -6,6 +6,7 @@ #include <common.h> #include <cros_ec.h> +#include <dm.h> #include <asm/gpio.h> #include <asm/io.h> #include <asm/pci.h> @@ -13,8 +14,13 @@ int arch_early_init_r(void) { - if (cros_ec_board_init()) - return -1; + struct udevice *dev; + int ret; + + /* Make sure the platform controller hub is up and running */ + ret = uclass_get_device(UCLASS_PCH, 0, &dev); + if (ret) + return ret; return 0; } diff --git a/board/google/chromebox_panther/Kconfig b/board/google/chromebox_panther/Kconfig new file mode 100644 index 0000000..11df55a --- /dev/null +++ b/board/google/chromebox_panther/Kconfig @@ -0,0 +1,34 @@ +if TARGET_CHROMEBOX_PANTHER + +config SYS_BOARD + default "chromebox_panther" + +config SYS_VENDOR + default "google" + +config SYS_SOC + default "ivybridge" + +config SYS_CONFIG_NAME + default "chromebox_panther" + +# Panther actually uses haswell, not ivybridge, so this is just a placeholder +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + select X86_RESET_VECTOR + select CPU_INTEL_SOCKET_RPGA989 + select NORTHBRIDGE_INTEL_IVYBRIDGE + select SOUTHBRIDGE_INTEL_C216 + select HAVE_ACPI_RESUME + select MARK_GRAPHICS_MEM_WRCOMB + select BOARD_ROMSIZE_KB_8192 + +config SYS_CAR_ADDR + hex + default 0xff7e0000 + +config SYS_CAR_SIZE + hex + default 0x20000 + +endif diff --git a/board/google/chromebox_panther/MAINTAINERS b/board/google/chromebox_panther/MAINTAINERS new file mode 100644 index 0000000..c88774b --- /dev/null +++ b/board/google/chromebox_panther/MAINTAINERS @@ -0,0 +1,6 @@ +CHROMEBOX PANTHER BOARD +M: Simon Glass <sjg@chromium.org> +S: Maintained +F: board/google/chromebook_panther/ +F: include/configs/chromebox_panther.h +F: configs/chromebox_panther_defconfig diff --git a/board/google/chromebox_panther/Makefile b/board/google/chromebox_panther/Makefile new file mode 100644 index 0000000..ce8820f --- /dev/null +++ b/board/google/chromebox_panther/Makefile @@ -0,0 +1,7 @@ +# +# Copyright (c) 2015 Google, Inc +# +# SPDX-License-Identifier: GPL-2.0+ +# + +obj-y += panther.o diff --git a/board/google/chromebox_panther/panther.c b/board/google/chromebox_panther/panther.c new file mode 100644 index 0000000..d492a03 --- /dev/null +++ b/board/google/chromebox_panther/panther.c @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2015 Google, Inc + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include <common.h> +#include <asm/arch/pch.h> + +int arch_early_init_r(void) +{ + return 0; +} + +int board_early_init_f(void) +{ + return 0; +} + +void setup_pch_gpios(u16 gpiobase, const struct pch_gpio_map *gpio) +{ +} diff --git a/board/gumstix/pepper/Kconfig b/board/gumstix/pepper/Kconfig index 750db85..6f94612 100644 --- a/board/gumstix/pepper/Kconfig +++ b/board/gumstix/pepper/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "pepper" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/gumstix/pepper/board.c b/board/gumstix/pepper/board.c index f644f81..beb2fac 100644 --- a/board/gumstix/pepper/board.c +++ b/board/gumstix/pepper/board.c @@ -165,7 +165,7 @@ int board_eth_init(bd_t *bis) mac_addr[3] = (mac_hi & 0xFF000000) >> 24; mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c index fc2385c..ba1beb5 100644 --- a/board/highbank/highbank.c +++ b/board/highbank/highbank.c @@ -57,7 +57,7 @@ void scsi_init(void) u32 reg = readl(HB_SREG_A9_PWRDOM_STAT); if (reg & PWRDOM_STAT_SATA) { - ahci_init(HB_AHCI_BASE); + ahci_init((void __iomem *)HB_AHCI_BASE); scsi_scan(1); } } diff --git a/board/ifm/ac14xx/ac14xx.c b/board/ifm/ac14xx/ac14xx.c index 5d2ab2f..72932ca 100644 --- a/board/ifm/ac14xx/ac14xx.c +++ b/board/ifm/ac14xx/ac14xx.c @@ -225,7 +225,7 @@ int mac_read_from_eeprom(void) break; } - if (mac && is_valid_ether_addr(mac)) { + if (mac && is_valid_ethaddr(mac)) { eth_setenv_enetaddr("ethaddr", mac); if (mac_diag) { mac_txt = getenv("ethaddr"); diff --git a/board/ip04/ip04.c b/board/ip04/ip04.c index ae52633..d20500f 100644 --- a/board/ip04/ip04.c +++ b/board/ip04/ip04.c @@ -32,7 +32,7 @@ int misc_init_r(void) uchar enetaddr[6]; if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(enetaddr); + net_random_ethaddr(enetaddr); eth_setenv_enetaddr("ethaddr", enetaddr); } diff --git a/board/isee/igep0033/Kconfig b/board/isee/igep0033/Kconfig index 9a8421e..e989e4b 100644 --- a/board/isee/igep0033/Kconfig +++ b/board/isee/igep0033/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "am335x_igep0033" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/isee/igep0033/board.c b/board/isee/igep0033/board.c index 9f8fcf2..5fea7ff 100644 --- a/board/isee/igep0033/board.c +++ b/board/isee/igep0033/board.c @@ -156,7 +156,7 @@ int board_eth_init(bd_t *bis) mac_addr[3] = (mac_hi & 0xFF000000) >> 24; mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } diff --git a/board/phytec/pcm051/Kconfig b/board/phytec/pcm051/Kconfig index bb98715..2cc0d88 100644 --- a/board/phytec/pcm051/Kconfig +++ b/board/phytec/pcm051/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "pcm051" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/phytec/pcm051/board.c b/board/phytec/pcm051/board.c index 1071662..1bf9d73 100644 --- a/board/phytec/pcm051/board.c +++ b/board/phytec/pcm051/board.c @@ -228,7 +228,7 @@ 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)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); else goto try_usbether; diff --git a/board/renesas/r0p7734/r0p7734.c b/board/renesas/r0p7734/r0p7734.c index 5687ad4..2e31ba6 100644 --- a/board/renesas/r0p7734/r0p7734.c +++ b/board/renesas/r0p7734/r0p7734.c @@ -55,7 +55,7 @@ int board_late_init(void) /* Read MAC address */ i2c_read(0x50, 0x10, 0, mac, 6); - if (is_valid_ether_addr(mac)) + if (is_valid_ethaddr(mac)) eth_setenv_enetaddr("ethaddr", mac); return 0; diff --git a/board/ronetix/pm9261/pm9261.c b/board/ronetix/pm9261/pm9261.c index 1f7679a..b96f745 100644 --- a/board/ronetix/pm9261/pm9261.c +++ b/board/ronetix/pm9261/pm9261.c @@ -288,7 +288,7 @@ void reset_phy(void) * Initialize ethernet HW addr prior to starting Linux, * needed for nfsroot */ - eth_init(gd->bd); + eth_init(); #endif } #endif diff --git a/board/ronetix/pm9g45/pm9g45.c b/board/ronetix/pm9g45/pm9g45.c index 15aa4ac..efc4133 100644 --- a/board/ronetix/pm9g45/pm9g45.c +++ b/board/ronetix/pm9g45/pm9g45.c @@ -166,7 +166,7 @@ void reset_phy(void) * Initialize ethernet HW addr prior to starting Linux, * needed for nfsroot */ - eth_init(gd->bd); + eth_init(); #endif } #endif diff --git a/board/samsung/common/board.c b/board/samsung/common/board.c index 0979868..9be2950 100644 --- a/board/samsung/common/board.c +++ b/board/samsung/common/board.c @@ -330,18 +330,6 @@ int board_late_init(void) } #endif -int arch_early_init_r(void) -{ -#ifdef CONFIG_CROS_EC - if (cros_ec_board_init()) { - printf("%s: Failed to init EC\n", __func__); - return 0; - } -#endif - - return 0; -} - #ifdef CONFIG_MISC_INIT_R int misc_init_r(void) { diff --git a/board/samsung/goni/Kconfig b/board/samsung/goni/Kconfig index 006e864..cbbf5a9 100644 --- a/board/samsung/goni/Kconfig +++ b/board/samsung/goni/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "s5p_goni" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/samsung/smdk5420/Kconfig b/board/samsung/smdk5420/Kconfig index 576abae..a9d62ff 100644 --- a/board/samsung/smdk5420/Kconfig +++ b/board/samsung/smdk5420/Kconfig @@ -22,9 +22,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "peach-pi" -config DM_CROS_EC - default y - endif if TARGET_PEACH_PIT @@ -38,9 +35,6 @@ config SYS_VENDOR config SYS_CONFIG_NAME default "peach-pit" -config DM_CROS_EC - default y - endif if TARGET_SMDK5420 diff --git a/board/samsung/smdkc100/Kconfig b/board/samsung/smdkc100/Kconfig index ea87166..d2157b4 100644 --- a/board/samsung/smdkc100/Kconfig +++ b/board/samsung/smdkc100/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "smdkc100" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/sandbox/README.sandbox b/board/sandbox/README.sandbox index 3c0df17..08489e3 100644 --- a/board/sandbox/README.sandbox +++ b/board/sandbox/README.sandbox @@ -173,16 +173,16 @@ U-Boot sandbox supports these emulations: - Chrome OS EC - GPIO - Host filesystem (access files on the host from within U-Boot) +- I2C - Keyboard (Chrome OS) - LCD +- Network - Serial (for console only) - Sound (incomplete - see sandbox_sdl_sound_init() for details) - SPI - SPI flash - TPM (Trusted Platform Module) -Notable omissions are networking and I2C. - A wide range of commands is implemented. Filesystems which use a block device are supported. @@ -190,6 +190,80 @@ Also sandbox uses generic board (CONFIG_SYS_GENERIC_BOARD) and supports driver model (CONFIG_DM) and associated commands. +Linux RAW Networking Bridge +--------------------------- + +The sandbox_eth_raw driver bridges traffic between the bottom of the network +stack and the RAW sockets API in Linux. This allows much of the U-Boot network +functionality to be tested in sandbox against real network traffic. + +For Ethernet network adapters, the bridge utilizes the RAW AF_PACKET API. This +is needed to get access to the lowest level of the network stack in Linux. This +means that all of the Ethernet frame is included. This allows the U-Boot network +stack to be fully used. In other words, nothing about the Linux network stack is +involved in forming the packets that end up on the wire. To receive the +responses to packets sent from U-Boot the network interface has to be set to +promiscuous mode so that the network card won't filter out packets not destined +for its configured (on Linux) MAC address. + +The RAW sockets Ethernet API requires elevated privileges in Linux. You can +either run as root, or you can add the capability needed like so: + +sudo /sbin/setcap "CAP_NET_RAW+ep" /path/to/u-boot + +The default device tree for sandbox includes an entry for eth0 on the sandbox +host machine whose alias is "eth1". The following are a few examples of network +operations being tested on the eth0 interface. + +sudo /path/to/u-boot -D + +DHCP +.... + +set autoload no +set ethact eth1 +dhcp + +PING +.... + +set autoload no +set ethact eth1 +dhcp +ping $gatewayip + +TFTP +.... + +set autoload no +set ethact eth1 +dhcp +set serverip WWW.XXX.YYY.ZZZ +tftpboot u-boot.bin + +The bridge also support (to a lesser extent) the localhost inderface, 'lo'. + +The 'lo' interface cannot use the RAW AF_PACKET API because the lo interface +doesn't support Ethernet-level traffic. It is a higher-level interface that is +expected only to be used at the AF_INET level of the API. As such, the most raw +we can get on that interface is the RAW AF_INET API on UDP. This allows us to +set the IP_HDRINCL option to include everything except the Ethernet header in +the packets we send and receive. + +Because only UDP is supported, ICMP traffic will not work, so expect that ping +commands will time out. + +The default device tree for sandbox includes an entry for lo on the sandbox +host machine whose alias is "eth5". The following is an example of a network +operation being tested on the lo interface. + +TFTP +.... + +set ethact eth5 +tftpboot u-boot.bin + + SPI Emulation ------------- diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index e4d4e02..2227f1c 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -53,18 +53,6 @@ int board_early_init_f(void) } #endif -int arch_early_init_r(void) -{ -#ifdef CONFIG_CROS_EC - if (cros_ec_board_init()) { - printf("%s: Failed to init EC\n", __func__); - return 0; - } -#endif - - return 0; -} - #ifdef CONFIG_BOARD_LATE_INIT int board_late_init(void) { diff --git a/board/siemens/common/factoryset.c b/board/siemens/common/factoryset.c index 7baac3d..d81f548 100644 --- a/board/siemens/common/factoryset.c +++ b/board/siemens/common/factoryset.c @@ -271,7 +271,7 @@ static int factoryset_mac_setenv(void) uint8_t mac_addr[6]; debug("FactorySet: Set mac address\n"); - if (is_valid_ether_addr(factory_dat.mac)) { + if (is_valid_ethaddr(factory_dat.mac)) { memcpy(mac_addr, factory_dat.mac, 6); } else { uint32_t mac_hi, mac_lo; @@ -286,7 +286,7 @@ static int factoryset_mac_setenv(void) mac_addr[3] = (mac_hi & 0xFF000000) >> 24; mac_addr[4] = mac_lo & 0xFF; mac_addr[5] = (mac_lo & 0xFF00) >> 8; - if (!is_valid_ether_addr(mac_addr)) { + if (!is_valid_ethaddr(mac_addr)) { printf("Warning: ethaddr not set by FactorySet or E-fuse. Set <ethaddr> variable to overcome this.\n"); return -1; } diff --git a/board/siemens/pxm2/board.c b/board/siemens/pxm2/board.c index 264ba02..4d8ba3c 100644 --- a/board/siemens/pxm2/board.c +++ b/board/siemens/pxm2/board.c @@ -222,7 +222,7 @@ int board_eth_init(bd_t *bis) struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE; #ifdef CONFIG_FACTORYSET int rv; - if (!is_valid_ether_addr(factory_dat.mac)) + if (!is_valid_ethaddr(factory_dat.mac)) printf("Error: no valid mac address\n"); else eth_setenv_enetaddr("ethaddr", factory_dat.mac); diff --git a/board/silica/pengwyn/Kconfig b/board/silica/pengwyn/Kconfig index 2e9a2b3..f2e1098 100644 --- a/board/silica/pengwyn/Kconfig +++ b/board/silica/pengwyn/Kconfig @@ -12,13 +12,4 @@ config SYS_SOC config SYS_CONFIG_NAME default "pengwyn" -config DM - default y - -config DM_GPIO - default y - -config DM_SERIAL - default y - endif diff --git a/board/silica/pengwyn/board.c b/board/silica/pengwyn/board.c index ee88b6f..815c9a7 100644 --- a/board/silica/pengwyn/board.c +++ b/board/silica/pengwyn/board.c @@ -189,7 +189,7 @@ 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)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); else return n; diff --git a/board/spear/spear300/spear300.c b/board/spear/spear300/spear300.c index 6b6bd9f..396b5bd 100644 --- a/board/spear/spear300/spear300.c +++ b/board/spear/spear300/spear300.c @@ -51,7 +51,7 @@ int board_eth_init(bd_t *bis) { int ret = 0; -#if defined(CONFIG_DESIGNWARE_ETH) +#if defined(CONFIG_ETH_DESIGNWARE) u32 interface = PHY_INTERFACE_MODE_MII; if (designware_initialize(CONFIG_SPEAR_ETHBASE, interface) >= 0) ret++; diff --git a/board/spear/spear310/spear310.c b/board/spear/spear310/spear310.c index a4c6a8e..6f39ef1 100644 --- a/board/spear/spear310/spear310.c +++ b/board/spear/spear310/spear310.c @@ -52,7 +52,7 @@ int board_eth_init(bd_t *bis) { int ret = 0; -#if defined(CONFIG_DESIGNWARE_ETH) +#if defined(CONFIG_ETH_DESIGNWARE) u32 interface = PHY_INTERFACE_MODE_MII; if (designware_initialize(CONFIG_SPEAR_ETHBASE, interface) >= 0) ret++; diff --git a/board/spear/spear320/spear320.c b/board/spear/spear320/spear320.c index ab732a7..52196af 100644 --- a/board/spear/spear320/spear320.c +++ b/board/spear/spear320/spear320.c @@ -63,7 +63,7 @@ int board_eth_init(bd_t *bis) { int ret = 0; -#if defined(CONFIG_DESIGNWARE_ETH) +#if defined(CONFIG_ETH_DESIGNWARE) u32 interface = PHY_INTERFACE_MODE_MII; if (designware_initialize(CONFIG_SPEAR_ETHBASE, interface) >= 0) ret++; diff --git a/board/spear/spear600/spear600.c b/board/spear/spear600/spear600.c index 8472002..fc0918f 100644 --- a/board/spear/spear600/spear600.c +++ b/board/spear/spear600/spear600.c @@ -46,7 +46,7 @@ int board_eth_init(bd_t *bis) { int ret = 0; -#if defined(CONFIG_DESIGNWARE_ETH) +#if defined(CONFIG_ETH_DESIGNWARE) u32 interface = PHY_INTERFACE_MODE_MII; #if defined(CONFIG_DW_AUTONEG) interface = PHY_INTERFACE_MODE_GMII; diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c index f465699..38f6e1d 100644 --- a/board/st/stv0991/stv0991.c +++ b/board/st/stv0991/stv0991.c @@ -94,7 +94,7 @@ int board_eth_init(bd_t *bis) { int ret = 0; -#if defined(CONFIG_DESIGNWARE_ETH) +#if defined(CONFIG_ETH_DESIGNWARE) u32 interface = PHY_INTERFACE_MODE_MII; if (designware_initialize(GMAC_BASE_ADDR, interface) >= 0) ret++; diff --git a/board/sunxi/ahci.c b/board/sunxi/ahci.c index b7f0dda..6d51b9b 100644 --- a/board/sunxi/ahci.c +++ b/board/sunxi/ahci.c @@ -83,5 +83,5 @@ void scsi_init(void) if (sunxi_ahci_phy_init(SUNXI_SATA_BASE) < 0) return; - ahci_init(SUNXI_SATA_BASE); + ahci_init((void __iomem *)SUNXI_SATA_BASE); } diff --git a/board/sunxi/gmac.c b/board/sunxi/gmac.c index 63a7360..d90eed4 100644 --- a/board/sunxi/gmac.c +++ b/board/sunxi/gmac.c @@ -80,11 +80,15 @@ int sunxi_gmac_initialize(bd_t *bis) sunxi_gpio_set_cfgpin(pin, SUN6I_GPA_GMAC); #endif -#ifdef CONFIG_RGMII +#ifdef CONFIG_DM_ETH + return 0; +#else +# ifdef CONFIG_RGMII return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_RGMII); -#elif defined CONFIG_GMII +# elif defined CONFIG_GMII return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_GMII); -#else +# else return designware_initialize(SUNXI_GMAC_BASE, PHY_INTERFACE_MODE_MII); +# endif #endif } diff --git a/board/tcm-bf518/tcm-bf518.c b/board/tcm-bf518/tcm-bf518.c index 5d25fcd..3fa7d97 100644 --- a/board/tcm-bf518/tcm-bf518.c +++ b/board/tcm-bf518/tcm-bf518.c @@ -39,14 +39,14 @@ static void board_init_enetaddr(uchar *mac_addr) for (ret = 0; ret < 6; ++ret) mac_addr[ret] = otp_mac_p[5 - ret]; - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) valid_mac = true; } #endif if (!valid_mac) { puts("Warning: Generating 'random' MAC address\n"); - eth_random_addr(mac_addr); + net_random_ethaddr(mac_addr); } eth_setenv_enetaddr("ethaddr", mac_addr); diff --git a/board/tcm-bf537/tcm-bf537.c b/board/tcm-bf537/tcm-bf537.c index a4f0f71..2531a44 100644 --- a/board/tcm-bf537/tcm-bf537.c +++ b/board/tcm-bf537/tcm-bf537.c @@ -31,7 +31,7 @@ static void board_init_enetaddr(char *var) return; printf("Warning: %s: generating 'random' MAC address\n", var); - eth_random_addr(enetaddr); + net_random_ethaddr(enetaddr); eth_setenv_enetaddr(var, enetaddr); } diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig index 7cb006f..49b73ab 100644 --- a/board/ti/am335x/Kconfig +++ b/board/ti/am335x/Kconfig @@ -38,13 +38,4 @@ config NOR_BOOT as the ROM only partially sets up pinmux. We also default to using NOR for environment. -config DM - default y - -config DM_GPIO - default y if DM - -config DM_SERIAL - default y if DM - endif diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c index 0739e60..96245a3 100644 --- a/board/ti/am335x/board.c +++ b/board/ti/am335x/board.c @@ -593,7 +593,7 @@ int board_eth_init(bd_t *bis) if (!getenv("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } @@ -609,7 +609,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = (mac_lo & 0xFF00) >> 8; if (!getenv("eth1addr")) { - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("eth1addr", mac_addr); } @@ -658,7 +658,7 @@ int board_eth_init(bd_t *bis) #endif #if defined(CONFIG_USB_ETHER) && \ (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_USBETH_SUPPORT)) - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("usbnet_devaddr", mac_addr); rv = usb_eth_initialize(bis); diff --git a/board/ti/am43xx/board.c b/board/ti/am43xx/board.c index ddf4c5f..4aae230 100644 --- a/board/ti/am43xx/board.c +++ b/board/ti/am43xx/board.c @@ -802,7 +802,7 @@ int board_eth_init(bd_t *bis) if (!getenv("ethaddr")) { puts("<ethaddr> not set. Validating first E-fuse MAC\n"); - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } @@ -816,7 +816,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = (mac_lo & 0xFF00) >> 8; if (!getenv("eth1addr")) { - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("eth1addr", mac_addr); } diff --git a/board/ti/beagle_x15/board.c b/board/ti/beagle_x15/board.c index ac0d22c..ffcd531 100644 --- a/board/ti/beagle_x15/board.c +++ b/board/ti/beagle_x15/board.c @@ -356,7 +356,7 @@ int board_eth_init(bd_t *bis) if (!getenv("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } @@ -370,7 +370,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = mac_lo & 0xFF; if (!getenv("eth1addr")) { - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("eth1addr", mac_addr); } diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index 3089fa2..c101928 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -341,7 +341,7 @@ int board_eth_init(bd_t *bis) if (!getenv("ethaddr")) { printf("<ethaddr> not set. Validating first E-fuse MAC\n"); - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); } @@ -355,7 +355,7 @@ int board_eth_init(bd_t *bis) mac_addr[5] = mac_lo & 0xFF; if (!getenv("eth1addr")) { - if (is_valid_ether_addr(mac_addr)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("eth1addr", mac_addr); } diff --git a/board/ti/ti814x/evm.c b/board/ti/ti814x/evm.c index 54b3dfb..e406dab 100644 --- a/board/ti/ti814x/evm.c +++ b/board/ti/ti814x/evm.c @@ -178,7 +178,7 @@ 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)) + if (is_valid_ethaddr(mac_addr)) eth_setenv_enetaddr("ethaddr", mac_addr); else printf("Unable to read MAC address. Set <ethaddr>\n"); |