mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
ARM: fdt support: Add usbethaddr as an acceptable MAC
A board that has a USB ethernet device only may set the usbetheraddr and not the ethaddr. ethaddr will be the default MAC address that is chosen and if that is not populated then the usbethaddr is looked at. If neither are set then then device tree blob is not modified. Signed-off-by: Dan Murphy <dmurphy@ti.com>
This commit is contained in:
parent
2e43646782
commit
b1f49ab8c7
1 changed files with 11 additions and 1 deletions
|
@ -479,8 +479,18 @@ void fdt_fixup_ethernet(void *fdt)
|
|||
if (node < 0)
|
||||
return;
|
||||
|
||||
i = 0;
|
||||
if (!getenv("ethaddr")) {
|
||||
if (getenv("usbethaddr")) {
|
||||
strcpy(mac, "usbethaddr");
|
||||
} else {
|
||||
debug("No ethernet MAC Address defined\n");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
strcpy(mac, "ethaddr");
|
||||
}
|
||||
|
||||
i = 0;
|
||||
while ((tmp = getenv(mac)) != NULL) {
|
||||
sprintf(enet, "ethernet%d", i);
|
||||
path = fdt_getprop(fdt, node, enet, NULL);
|
||||
|
|
Loading…
Reference in a new issue