mpc83xx: update [local-]mac-address properties on UEC based devices
PATCH 1/1 mpc83xx: update [local-]mac-address properties on UEC based devices
8360 and 832x weren't updating their [local-]mac-address properties. This patch fixes that.
Signed-off-by Kim Phillips <[email protected]>
---
this patch applies to the mpc83xx branch of:
http://opensource.freescale.com/pub/scm/u-boot-83xx.git
cpu/mpc83xx/cpu.c | 40 ++++++++++++++++++++++++++++++++++++++++ include/configs/MPC832XEMDS.h | 1 + include/configs/MPC8360EMDS.h | 1 + 3 files changed, 42 insertions(+), 0 deletions(-)
cpu/mpc83xx/cpu.c +40 -0
@@ -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 at 2000/mac-address" , &len); +if (p !=NULL ) +memcpy (p, bd->bi_enetaddr,6 ); + + p =ft_get_prop (blob,"/" OF_QE "/ucc at 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 at 2200/mac-address" , &len); +if (p !=NULL ) +memcpy (p, bd->bi_enetaddr,6 ); + + p =ft_get_prop (blob,"/" OF_QE "/ucc at 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 at 3000/mac-address" , &len); +if (p !=NULL ) +memcpy (p, bd->bi_enet1addr,6 ); + + p =ft_get_prop (blob,"/" OF_QE "/ucc at 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 at 3200/mac-address" , &len); +if (p !=NULL ) +memcpy (p, bd->bi_enet1addr,6 ); + + p =ft_get_prop (blob,"/" OF_QE "/ucc at 3200/local-mac-address" , &len); +if (p !=NULL ) +memcpy (p, bd->bi_enet1addr,6 ); +#endif +#endif }#endif
include/configs/MPC832XEMDS.h +1 -0
@@ -323,6 +323,7 @@#define OF_CPU "PowerPC,8323 at 0"#define OF_SOC "soc8323 at e0000000" +#define OF_QE "qe at e0100000"#define OF_TBCLK (bd->bi_busfreq / 4)#define OF_STDOUT_PATH "/soc8323 at e0000000/serial at 4500"
include/configs/MPC8360EMDS.h +1 -0
@@ -350,6 +350,7 @@#define OF_CPU "PowerPC,8360 at 0"#define OF_SOC "soc8360 at e0000000" +#define OF_QE "qe at e0100000"#define OF_TBCLK (bd->bi_busfreq / 4)#define OF_STDOUT_PATH "/soc8360 at e0000000/serial at 4500"
Signature · 1 line
1.4.4