5xxx: write MAC address to mac-address and local-mac-address
authorTimur Tabi <timur@freescale.com>
Sat, 5 May 2007 06:12:30 +0000 (08:12 +0200)
committerWolfgang Denk <wd@denx.de>
Sat, 5 May 2007 19:35:59 +0000 (21:35 +0200)
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.

Signed-off-by: Timur Tabi <timur@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
cpu/mpc5xxx/cpu.c

index 73b166d999e51e894ff64c373ba9d03ef683ff08..1eac2bbfbe10a2f1e64c4d5f0bb959630c366258 100644 (file)
@@ -131,5 +131,9 @@ ft_cpu_setup(void *blob, bd_t *bd)
        p = ft_get_prop(blob, "/" OF_SOC "/ethernet@3000/mac-address", &len);
        if (p != NULL)
                memcpy(p, bd->bi_enetaddr, 6);
+
+       p = ft_get_prop(blob, "/" OF_SOC "/ethernet@3000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
 }
 #endif