diff options
author | Tom Rini <trini@konsulko.com> | 2021-08-18 00:59:37 +0300 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-08-30 21:10:05 +0300 |
commit | 20815ecdcf7b6cf118229af5bb2b474ca2215158 (patch) | |
tree | 24dc4929790015d7714c5083abed6d26fc5961e1 /board/davinci/da8xxevm/da850evm.c | |
parent | 2a1453695dd197f3b77c6303fe0d7a7b5bc86e67 (diff) | |
download | u-boot-20815ecdcf7b6cf118229af5bb2b474ca2215158.tar.xz |
davinci: Drop CONFIG_MAC_ADDR_IN_EEPROM
Looking over the current boards, there are no users of
CONFIG_MAC_ADDR_IN_EEPROM. Further, omapl138_lcdk uses
CONFIG_NET_RANDOM_ETHADDR. Drop various unused code paths.
Cc: Adam Ford <aford173@gmail.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/davinci/da8xxevm/da850evm.c')
-rw-r--r-- | board/davinci/da8xxevm/da850evm.c | 41 |
1 files changed, 3 insertions, 38 deletions
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c index 6c75231ddf..f6ce3367f8 100644 --- a/board/davinci/da8xxevm/da850evm.c +++ b/board/davinci/da8xxevm/da850evm.c @@ -129,19 +129,12 @@ int misc_init_r(void) { dspwake(); -#if defined(CONFIG_MAC_ADDR_IN_SPIFLASH) || defined(CONFIG_MAC_ADDR_IN_EEPROM) - - uchar env_enetaddr[6]; - int enetaddr_found; +#if defined(CONFIG_MAC_ADDR_IN_SPIFLASH) + uchar env_enetaddr[6], buff[6]; + int enetaddr_found, spi_mac_read; enetaddr_found = eth_env_get_enetaddr("ethaddr", env_enetaddr); -#endif - -#ifdef CONFIG_MAC_ADDR_IN_SPIFLASH - int spi_mac_read; - uchar buff[6]; - spi_mac_read = get_mac_addr(buff); buff[0] = 0; @@ -173,34 +166,6 @@ int misc_init_r(void) "with the MAC address in the environment\n"); printf("Default using MAC address from environment\n"); } - -#elif defined(CONFIG_MAC_ADDR_IN_EEPROM) - uint8_t enetaddr[8]; - int eeprom_mac_read; - - /* Read Ethernet MAC address from EEPROM */ - eeprom_mac_read = dvevm_read_mac_address(enetaddr); - - /* - * MAC address not present in the environment - * try and read the MAC address from EEPROM flash - * and set it. - */ - if (!enetaddr_found) { - if (eeprom_mac_read) - /* Set Ethernet MAC address from EEPROM */ - davinci_sync_env_enetaddr(enetaddr); - } else { - /* - * MAC address present in environment compare it with - * the MAC address in EEPROM and warn on mismatch - */ - if (eeprom_mac_read && memcmp(enetaddr, env_enetaddr, 6)) - printf("Warning: MAC address in EEPROM don't match " - "with the MAC address in the environment\n"); - printf("Default using MAC address from environment\n"); - } - #endif return 0; } |