summaryrefslogtreecommitdiff
path: root/board/davinci
diff options
context:
space:
mode:
authorAdam Ford <aford173@gmail.com>2017-09-08 17:01:17 -0500
committerTom Rini <trini@konsulko.com>2017-09-13 09:24:26 -0400
commit919ccb9fe55febcc628e43dc1fea00ecc71e8bdf (patch)
tree3599e032898b05c6fa77d7df54c0ae86596e71b7 /board/davinci
parent7672d9d582abfc380b8160c294b5de5bf97286be (diff)
downloadu-boot-919ccb9fe55febcc628e43dc1fea00ecc71e8bdf.tar.gz
u-boot-919ccb9fe55febcc628e43dc1fea00ecc71e8bdf.tar.bz2
u-boot-919ccb9fe55febcc628e43dc1fea00ecc71e8bdf.zip
davinci: da850evm: Make EEPROM MAC code configurable
There was a check for CONFIG_MAC_ADDR_IN_EEPROM and a check for CONFIG_MAC_ADDR_IN_SPIFLASH, however some of the EEPROM related code wasn't encapsulated inside the #if defined statement so the EEPROM code could get executed even when it wasn't explicitly enabled or wanted. Signed-off-by: Adam Ford <aford173@gmail.com>
Diffstat (limited to 'board/davinci')
-rw-r--r--board/davinci/da8xxevm/da850evm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/board/davinci/da8xxevm/da850evm.c b/board/davinci/da8xxevm/da850evm.c
index c2d2e8e882..516d86df50 100644
--- a/board/davinci/da8xxevm/da850evm.c
+++ b/board/davinci/da8xxevm/da850evm.c
@@ -133,6 +133,8 @@ int misc_init_r(void)
enetaddr_found = eth_env_get_enetaddr("ethaddr", env_enetaddr);
+#endif
+
#ifdef CONFIG_MAC_ADDR_IN_SPIFLASH
int spi_mac_read;
uchar buff[6];
@@ -167,7 +169,8 @@ int misc_init_r(void)
"with the MAC address in the environment\n");
printf("Default using MAC address from environment\n");
}
-#endif
+
+#elif defined(CONFIG_MAC_ADDR_IN_EEPROM)
uint8_t enetaddr[8];
int eeprom_mac_read;