Skip to content
Snippets Groups Projects
Commit 02c2de6e authored by Fabien Parent's avatar Fabien Parent Committed by Tom Rini
Browse files

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: default avatarFabien Parent <fparent@baylibre.com>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent c19a28bc
No related branches found
No related tags found
No related merge requests found
......@@ -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())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment