From: Ben Warren Date: Fri, 6 Feb 2009 07:58:25 +0000 (-0800) Subject: net: removed board-specific CONFIGs from MPC5xxx FEC driver X-Git-Tag: v2009.03-rc1~90 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86321fc1128c93a10ac4afb9d317b0df8ece0f9e;p=u-boot net: removed board-specific CONFIGs from MPC5xxx FEC driver Added new CONFIG options for the three type of MAC-PHY interconnect and applied them all relevant board config files Signed-off-by: Ben Warren --- diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c index f8618b1726..2bf901e138 100644 --- a/drivers/net/mpc5xxx_fec.c +++ b/drivers/net/mpc5xxx_fec.c @@ -19,9 +19,6 @@ DECLARE_GLOBAL_DATA_PTR; /* #define DEBUG 0x28 */ -#if defined(CONFIG_CMD_NET) && defined(CONFIG_NET_MULTI) && \ - defined(CONFIG_MPC5xxx_FEC) - #if !(defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) #error "CONFIG_MII has to be defined!" #endif @@ -891,28 +888,11 @@ int mpc5xxx_fec_initialize(bd_t * bis) fec->eth = (ethernet_regs *)MPC5XXX_FEC; fec->tbdBase = (FEC_TBD *)FEC_BD_BASE; fec->rbdBase = (FEC_RBD *)(FEC_BD_BASE + FEC_TBD_NUM * sizeof(FEC_TBD)); -#if defined(CONFIG_CANMB) || \ - defined(CONFIG_CM5200) || \ - defined(CONFIG_HMI1001) || \ - defined(CONFIG_ICECUBE) || \ - defined(CONFIG_INKA4X0) || \ - defined(CONFIG_JUPITER) || \ - defined(CONFIG_MCC200) || \ - defined(CONFIG_MOTIONPRO) || \ - defined(CONFIG_MUCMC52) || \ - defined(CONFIG_O2DNT) || \ - defined(CONFIG_PM520) || \ - defined(CONFIG_TOP5200) || \ - defined(CONFIG_TQM5200) || \ - defined(CONFIG_UC101) || \ - defined(CONFIG_V38B) || \ - defined(CONFIG_MUNICES) -# ifndef CONFIG_FEC_10MBIT +#if defined(CONFIG_MPC5xxx_FEC_MII100) fec->xcv_type = MII100; -# else +#elif defined(CONFIG_MPC5xxx_FEC_MII10) fec->xcv_type = MII10; -# endif -#elif defined(CONFIG_TOTAL5200) +#elif defined(CONFIG_MPC5xxx_FEC_SEVENWIRE) fec->xcv_type = SEVENWIRE; #else #error fec->xcv_type not initialized. @@ -1064,5 +1044,3 @@ static uint32 local_crc32(char *string, unsigned int crc_value, int len) /**/ return crc; } #endif /* DEBUG */ - -#endif /* CONFIG_MPC5xxx_FEC */ diff --git a/include/configs/BC3450.h b/include/configs/BC3450.h index 28be8dd62f..bced118e38 100644 --- a/include/configs/BC3450.h +++ b/include/configs/BC3450.h @@ -396,10 +396,11 @@ /* * Ethernet configuration * - * Define CONFIG_FEC10MBIT to force FEC at 10MBIT + * Define CONFIG_MPC5xxx_MII10 to force FEC at 10MBIT */ #define CONFIG_MPC5xxx_FEC 1 -#undef CONFIG_FEC_10MBIT +#define CONFIG_MPC5xxx_FEC_MII100 +#undef CONFIG_MPC5xxx_MII10 #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/IceCube.h b/include/configs/IceCube.h index f8c94ec2c2..5ef0b7798e 100644 --- a/include/configs/IceCube.h +++ b/include/configs/IceCube.h @@ -293,14 +293,12 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 -#if defined(CONFIG_LITE5200B) -#define CONFIG_FEC_MII100 1 -#endif /* * GPIO configuration diff --git a/include/configs/PM520.h b/include/configs/PM520.h index e250e0338d..ff73ef9a29 100644 --- a/include/configs/PM520.h +++ b/include/configs/PM520.h @@ -279,10 +279,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/TB5200.h b/include/configs/TB5200.h index 60102469c5..b42d3d944d 100644 --- a/include/configs/TB5200.h +++ b/include/configs/TB5200.h @@ -344,10 +344,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/TOP5200.h b/include/configs/TOP5200.h index 046948e746..50197f4c51 100644 --- a/include/configs/TOP5200.h +++ b/include/configs/TOP5200.h @@ -312,7 +312,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 -#define CONFIG_FEC_10MBIT 1 /* Workaround for FEC 100Mbit problem */ +#define CONFIG_MPC5xxx_FEC_MII10 /* Workaround for FEC 100Mbit problem */ #define CONFIG_PHY_ADDR 0x1f #define CONFIG_PHY_TYPE 0x79c874 /* diff --git a/include/configs/TQM5200.h b/include/configs/TQM5200.h index db7f51d4e7..6850eba15d 100644 --- a/include/configs/TQM5200.h +++ b/include/configs/TQM5200.h @@ -507,10 +507,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/Total5200.h b/include/configs/Total5200.h index 75d1985ff3..9a75848079 100644 --- a/include/configs/Total5200.h +++ b/include/configs/Total5200.h @@ -268,6 +268,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_SEVENWIRE /* dummy, 7-wire FEC does not have phy address */ #define CONFIG_PHY_ADDR 0x00 diff --git a/include/configs/canmb.h b/include/configs/canmb.h index ff7b6e5ca1..1f275e5dbc 100644 --- a/include/configs/canmb.h +++ b/include/configs/canmb.h @@ -173,6 +173,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x0 /* * GPIO configuration: diff --git a/include/configs/cm5200.h b/include/configs/cm5200.h index 620ffea08d..ddcc6aad46 100644 --- a/include/configs/cm5200.h +++ b/include/configs/cm5200.h @@ -65,6 +65,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x00 #define CONFIG_ENV_OVERWRITE 1 /* allow overwriting of ethaddr */ /* use misc_init_r() to read ethaddr from I2C EEPROM (see CONFIG_SYS_I2C_EEPROM) */ diff --git a/include/configs/cpci5200.h b/include/configs/cpci5200.h index b9dabac989..52df16af14 100644 --- a/include/configs/cpci5200.h +++ b/include/configs/cpci5200.h @@ -259,6 +259,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* * Define CONFIG_FEC_10MBIT to force FEC at 10Mb */ diff --git a/include/configs/hmi1001.h b/include/configs/hmi1001.h index 16b06cd8b6..a81527ebed 100644 --- a/include/configs/hmi1001.h +++ b/include/configs/hmi1001.h @@ -215,6 +215,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x00 #define CONFIG_MII 1 /* MII PHY management */ diff --git a/include/configs/inka4x0.h b/include/configs/inka4x0.h index 405234cc85..e42fa6dcc8 100644 --- a/include/configs/inka4x0.h +++ b/include/configs/inka4x0.h @@ -221,10 +221,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 #define CONFIG_MII diff --git a/include/configs/jupiter.h b/include/configs/jupiter.h index 2ebe370575..9c45acf88b 100644 --- a/include/configs/jupiter.h +++ b/include/configs/jupiter.h @@ -239,10 +239,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/mcc200.h b/include/configs/mcc200.h index e64cc3704b..e5812ee8a2 100644 --- a/include/configs/mcc200.h +++ b/include/configs/mcc200.h @@ -271,11 +271,12 @@ /* * Ethernet configuration */ -/*#define CONFIG_MPC5xxx_FEC 1*/ +/* #define CONFIG_MPC5xxx_FEC 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII100 */ /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 1 /* diff --git a/include/configs/mecp5200.h b/include/configs/mecp5200.h index 7ef5bdfd9d..4a93b58885 100644 --- a/include/configs/mecp5200.h +++ b/include/configs/mecp5200.h @@ -243,10 +243,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 #define CONFIG_UDP_CHECKSUM 1 diff --git a/include/configs/motionpro.h b/include/configs/motionpro.h index b3f16d5e7c..e6e3729a20 100644 --- a/include/configs/motionpro.h +++ b/include/configs/motionpro.h @@ -82,6 +82,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x2 #define CONFIG_PHY_TYPE 0x79c874 #define CONFIG_RESET_PHY_R 1 diff --git a/include/configs/mucmc52.h b/include/configs/mucmc52.h index 2f48a0f251..ae60cd2215 100644 --- a/include/configs/mucmc52.h +++ b/include/configs/mucmc52.h @@ -225,6 +225,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x00 #define CONFIG_MII 1 /* MII PHY management */ diff --git a/include/configs/munices.h b/include/configs/munices.h index 7682faa32a..fa5230f52e 100644 --- a/include/configs/munices.h +++ b/include/configs/munices.h @@ -166,6 +166,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x01 #define CONFIG_MII 1 diff --git a/include/configs/o2dnt.h b/include/configs/o2dnt.h index bfae7b4291..18e7cc2a9c 100644 --- a/include/configs/o2dnt.h +++ b/include/configs/o2dnt.h @@ -233,10 +233,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 /* diff --git a/include/configs/pf5200.h b/include/configs/pf5200.h index b2e2a1c4a0..8ca55d78ec 100644 --- a/include/configs/pf5200.h +++ b/include/configs/pf5200.h @@ -245,10 +245,11 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 /* - * Define CONFIG_FEC_10MBIT to force FEC at 10Mb + * Define CONFIG_MPC5xxx_FEC_MII10 to force FEC at 10Mb */ -/* #define CONFIG_FEC_10MBIT 1 */ +/* #define CONFIG_MPC5xxx_FEC_MII10 */ #define CONFIG_PHY_ADDR 0x00 #define CONFIG_UDP_CHECKSUM 1 diff --git a/include/configs/uc101.h b/include/configs/uc101.h index 553eb25fbb..87cb4e508b 100644 --- a/include/configs/uc101.h +++ b/include/configs/uc101.h @@ -233,6 +233,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x00 #define CONFIG_MII 1 diff --git a/include/configs/v38b.h b/include/configs/v38b.h index 0156ce1c18..fc7128e738 100644 --- a/include/configs/v38b.h +++ b/include/configs/v38b.h @@ -247,6 +247,7 @@ * Ethernet configuration */ #define CONFIG_MPC5xxx_FEC 1 +#define CONFIG_MPC5xxx_FEC_MII100 #define CONFIG_PHY_ADDR 0x00 #define CONFIG_MII 1