]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mpc83xx: update [local-]mac-address properties on UEC based devices
authorKim Phillips <kim.phillips@freescale.com>
Fri, 23 Feb 2007 02:06:57 +0000 (20:06 -0600)
committerKim Phillips <kim.phillips@freescale.com>
Fri, 2 Mar 2007 17:05:54 +0000 (11:05 -0600)
8360 and 832x weren't updating their [local-]mac-address
properties. This patch fixes that.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
cpu/mpc83xx/cpu.c
include/configs/MPC832XEMDS.h
include/configs/MPC8360EMDS.h

index c4e2d0ef4ea938adc11629619b0228fef9bee1bc..e4bc4052db5dee4923ad28b0aff71b1920b1d03b 100644 (file)
@@ -335,6 +335,46 @@ ft_cpu_setup(void *blob, bd_t *bd)
        if (p != NULL)
                memcpy(p, bd->bi_enet1addr, 6);
 #endif
+
+#ifdef CONFIG_UEC_ETH1
+#if CFG_UEC1_UCC_NUM == 0  /* UCC1 */
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@2000/mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
+
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@2000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
+#elif CFG_UEC1_UCC_NUM == 2  /* UCC3 */
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@2200/mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
+
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@2200/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enetaddr, 6);
+#endif
+#endif
+
+#ifdef CONFIG_UEC_ETH2
+#if CFG_UEC2_UCC_NUM == 1  /* UCC2 */
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@3000/mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
+
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@3000/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
+#elif CFG_UEC2_UCC_NUM == 3  /* UCC4 */
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@3200/mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
+
+       p = ft_get_prop(blob, "/" OF_QE "/ucc@3200/local-mac-address", &len);
+       if (p != NULL)
+               memcpy(p, bd->bi_enet1addr, 6);
+#endif
+#endif
 }
 #endif
 
index 1155cbd4aff7888b4adbf3cc283e22d242ac13f7..cecb2258ffe4973aabc8a5b59ddcb13c5a54120b 100644 (file)
 
 #define OF_CPU                 "PowerPC,8323@0"
 #define OF_SOC                 "soc8323@e0000000"
+#define OF_QE                  "qe@e0100000"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH         "/soc8323@e0000000/serial@4500"
 
index ef4871bb69b5267c9a577f01a44cdde811d6a860..d2af0e1dfc4f86ac6810fd2b6481abe6a61cf4cb 100644 (file)
 
 #define OF_CPU                 "PowerPC,8360@0"
 #define OF_SOC                 "soc8360@e0000000"
+#define OF_QE                  "qe@e0100000"
 #define OF_TBCLK               (bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH         "/soc8360@e0000000/serial@4500"