Skip to contentSkip to conversation

5xxx: write MAC address to mac-address and local-mac-address

PATCH New Timur Tabi 1 participant 1 message Feb 12, 2007

lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 5xxx: write MAC address to mac-address and local-mac-address

Some device trees have a mac-address property, some have local-mac-address, and some have both. To support all of these device trees, ftp_cpu_setup() should write the MAC address to mac-address and local-mac-address, if they exist.

---
 cpu/mpc5xxx/cpu.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
cpu/mpc5xxx/cpu.c +4 -0
index 813aa79..383e418 100644
@@ -127,5 +127,9 @@ ft_cpu_setup(void *blob, bd_t *bd)
 	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 3000/mac-address", &len);
 	if (p != NULL)
 		memcpy(p, bd->bi_enetaddr, 6);
+
+	p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 3000/local-mac-address", &len);
+	if (p != NULL)
+		memcpy(p, bd->bi_enetaddr, 6);
 }
 #endif
Signature · 1 line
1.4.4