summaryrefslogtreecommitdiff
path: root/board/davinci/da8xxevm
diff options
context:
space:
mode:
authorFabien Parent <fparent@baylibre.com>2016-11-10 17:16:35 +0100
committerTom Rini <trini@konsulko.com>2016-11-13 15:54:35 -0500
commit02c2de6eb0e2b4170329a51fae3aeb955b330f7b (patch)
tree3c10ec09a6146cd6a999b492c753a77a11d4690e /board/davinci/da8xxevm
parentc19a28bc65aa27fe143e3c784d4f2e19e08810bf (diff)
davinci: omapl138_lcdk: keep booting even when MAC address is invalid
If the MAC address specified on the EEPROM is invalid (multicast or zero address), then u-boot fails to boot. Having a bad MAC address in the EEPROM should not prevent the system from booting. This commit changes the error path to just print an error messages in case of bad MAC address. Signed-off-by: Fabien Parent <fparent@baylibre.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'board/davinci/da8xxevm')
-rw-r--r--board/davinci/da8xxevm/omapl138_lcdk.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/board/davinci/da8xxevm/omapl138_lcdk.c b/board/davinci/da8xxevm/omapl138_lcdk.c
index 9783b2a0bc..9c1a483312 100644
--- a/board/davinci/da8xxevm/omapl138_lcdk.c
+++ b/board/davinci/da8xxevm/omapl138_lcdk.c
@@ -333,15 +333,17 @@ int misc_init_r(void)
get_mac_addr(addr);
}
- if (is_multicast_ethaddr(addr) || is_zero_ethaddr(addr)) {
+ if (!is_multicast_ethaddr(addr) && !is_zero_ethaddr(addr)) {
+ sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x",
+ addr[0], addr[1], addr[2], addr[3], addr[4],
+ addr[5]);
+
+ setenv("ethaddr", (char *)tmp);
+ } else {
printf("Invalid MAC address read.\n");
- return -EINVAL;
}
- sprintf((char *)tmp, "%02x:%02x:%02x:%02x:%02x:%02x", addr[0],
- addr[1], addr[2], addr[3], addr[4], addr[5]);
-
- setenv("ethaddr", (char *)tmp);
}
+
#ifdef CONFIG_DRIVER_TI_EMAC_USE_RMII
/* Select RMII fucntion through the expander */
if (rmii_hw_init())