Commit a08fbdb7 authored by Kevin Hilman's avatar Kevin Hilman

ARM: DaVinci: Allow eth= commandline to override MAC addr in EEPROM

Signed-off-by: default avatarKevin Hilman <khilman@mvista.com>
parent a8e67c9d
......@@ -39,6 +39,12 @@ int davinci_get_macaddr (char *ptr)
return -EFAULT;
}
/* If already assigned via cmdline, just use it */
if (strncmp(cpmac_eth_string, "deadbeef", 8)) {
strncpy (ptr, cpmac_eth_string, 20);
return 0;
}
davinci_i2c_write (2, data, 0x50);
davinci_i2c_read (8, temp, 0x50);
......@@ -84,7 +90,7 @@ int davinci_get_macaddr (char *ptr)
} else
#endif
{
strcpy (ptr, cpmac_eth_string);
strncpy (ptr, cpmac_eth_string, 20);
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment