From ccf21c311e68d48399eff1e72936052885f6e3f7 Mon Sep 17 00:00:00 2001 From: Joakim Tjernlund Date: Thu, 6 Dec 2007 16:43:40 +0100 Subject: Add support CONFIG_UEC_ETH3 in MPC83xx Signed-off-by: Joakim Tjernlund --- cpu/mpc83xx/cpu.c | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 115 insertions(+), 1 deletion(-) (limited to 'cpu') diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c index 8d69d22905..3d3f20a636 100644 --- a/cpu/mpc83xx/cpu.c +++ b/cpu/mpc83xx/cpu.c @@ -520,6 +520,15 @@ static const struct { "local-mac-address", fdt_set_eth0 }, +#elif CFG_UEC1_UCC_NUM == 1 /* UCC2 */ + { "/" OF_QE "/ucc@3000", + "mac-address", + fdt_set_eth0 + }, + { "/" OF_QE "/ucc@3000", + "local-mac-address", + fdt_set_eth0 + }, #elif CFG_UEC1_UCC_NUM == 2 /* UCC3 */ { "/" OF_QE "/ucc@2200", "mac-address", @@ -529,10 +538,28 @@ static const struct { "local-mac-address", fdt_set_eth0 }, +#elif CFG_UEC1_UCC_NUM == 3 /* UCC4 */ + { "/" OF_QE "/ucc@3200", + "mac-address", + fdt_set_eth0 + }, + { "/" OF_QE "/ucc@3200", + "local-mac-address", + fdt_set_eth0 + }, #endif #endif /* CONFIG_UEC_ETH1 */ #ifdef CONFIG_UEC_ETH2 -#if CFG_UEC2_UCC_NUM == 1 /* UCC2 */ +#if CFG_UEC2_UCC_NUM == 0 /* UCC1 */ + { "/" OF_QE "/ucc@2000", + "mac-address", + fdt_set_eth1 + }, + { "/" OF_QE "/ucc@2000", + "local-mac-address", + fdt_set_eth1 + }, +#elif CFG_UEC2_UCC_NUM == 1 /* UCC2 */ { "/" OF_QE "/ucc@3000", "mac-address", fdt_set_eth1 @@ -541,6 +568,15 @@ static const struct { "local-mac-address", fdt_set_eth1 }, +#elif CFG_UEC2_UCC_NUM == 2 /* UCC3 */ + { "/" OF_QE "/ucc@2200", + "mac-address", + fdt_set_eth1 + }, + { "/" OF_QE "/ucc@2200", + "local-mac-address", + fdt_set_eth1 + }, #elif CFG_UEC2_UCC_NUM == 3 /* UCC4 */ { "/" OF_QE "/ucc@3200", "mac-address", @@ -552,6 +588,84 @@ static const struct { }, #endif #endif /* CONFIG_UEC_ETH2 */ +#ifdef CONFIG_UEC_ETH3 +#if CFG_UEC3_UCC_NUM == 0 /* UCC1 */ + { "/" OF_QE "/ucc@2000", + "mac-address", + fdt_set_eth2 + }, + { "/" OF_QE "/ucc@2000", + "local-mac-address", + fdt_set_eth2 + }, +#elif CFG_UEC3_UCC_NUM == 1 /* UCC2 */ + { "/" OF_QE "/ucc@3000", + "mac-address", + fdt_set_eth2 + }, + { "/" OF_QE "/ucc@3000", + "local-mac-address", + fdt_set_eth2 + }, +#elif CFG_UEC3_UCC_NUM == 2 /* UCC3 */ + { "/" OF_QE "/ucc@2200", + "mac-address", + fdt_set_eth2 + }, + { "/" OF_QE "/ucc@2200", + "local-mac-address", + fdt_set_eth2 + }, +#elif CFG_UEC3_UCC_NUM == 3 /* UCC4 */ + { "/" OF_QE "/ucc@3200", + "mac-address", + fdt_set_eth2 + }, + { "/" OF_QE "/ucc@3200", + "local-mac-address", + fdt_set_eth2 + }, +#endif +#endif /* CONFIG_UEC_ETH3 */ +#ifdef CONFIG_UEC_ETH4 +#if CFG_UEC4_UCC_NUM == 0 /* UCC1 */ + { "/" OF_QE "/ucc@2000", + "mac-address", + fdt_set_eth3 + }, + { "/" OF_QE "/ucc@2000", + "local-mac-address", + fdt_set_eth3 + }, +#elif CFG_UEC4_UCC_NUM == 1 /* UCC2 */ + { "/" OF_QE "/ucc@3000", + "mac-address", + fdt_set_eth3 + }, + { "/" OF_QE "/ucc@3000", + "local-mac-address", + fdt_set_eth3 + }, +#elif CFG_UEC4_UCC_NUM == 2 /* UCC3 */ + { "/" OF_QE "/ucc@2200", + "mac-address", + fdt_set_eth3 + }, + { "/" OF_QE "/ucc@2200", + "local-mac-address", + fdt_set_eth3 + }, +#elif CFG_UEC4_UCC_NUM == 3 /* UCC4 */ + { "/" OF_QE "/ucc@3200", + "mac-address", + fdt_set_eth3 + }, + { "/" OF_QE "/ucc@3200", + "local-mac-address", + fdt_set_eth3 + }, +#endif +#endif /* CONFIG_UEC_ETH4 */ #endif /* CONFIG_QE */ }; -- cgit v1.2.1