summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Warren <biggerbadderben@gmail.com>2009-02-05 23:58:25 -0800
committerBen Warren <biggerbadderben@gmail.com>2009-02-09 23:01:40 -0800
commit86321fc1128c93a10ac4afb9d317b0df8ece0f9e (patch)
treec729d740fd6d105969cc28e765eabd7b47b992ca
parent638ed3e296e70fab286d157b7adedaaa4a09a474 (diff)
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 <biggerbadderben@gmail.com>
-rw-r--r--drivers/net/mpc5xxx_fec.c28
-rw-r--r--include/configs/BC3450.h5
-rw-r--r--include/configs/IceCube.h8
-rw-r--r--include/configs/PM520.h5
-rw-r--r--include/configs/TB5200.h5
-rw-r--r--include/configs/TOP5200.h2
-rw-r--r--include/configs/TQM5200.h5
-rw-r--r--include/configs/Total5200.h1
-rw-r--r--include/configs/canmb.h1
-rw-r--r--include/configs/cm5200.h1
-rw-r--r--include/configs/cpci5200.h1
-rw-r--r--include/configs/hmi1001.h1
-rw-r--r--include/configs/inka4x0.h5
-rw-r--r--include/configs/jupiter.h5
-rw-r--r--include/configs/mcc200.h7
-rw-r--r--include/configs/mecp5200.h5
-rw-r--r--include/configs/motionpro.h1
-rw-r--r--include/configs/mucmc52.h1
-rw-r--r--include/configs/munices.h1
-rw-r--r--include/configs/o2dnt.h5
-rw-r--r--include/configs/pf5200.h5
-rw-r--r--include/configs/uc101.h1
-rw-r--r--include/configs/v38b.h1
23 files changed, 48 insertions, 52 deletions
diff --git a/drivers/net/mpc5xxx_fec.c b/drivers/net/mpc5xxx_fec.c
index f8618b1726e..2bf901e138b 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 28be8dd62f2..bced118e385 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 f8c94ec2c2c..5ef0b7798e5 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 e250e0338d5..ff73ef9a290 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 60102469c52..b42d3d944d9 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 046948e7460..50197f4c51c 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 db7f51d4e7a..6850eba15dd 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 75d1985ff3c..9a75848079c 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 ff7b6e5ca1a..1f275e5dbcf 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 620ffea08d7..ddcc6aad465 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 b9dabac989d..52df16af14a 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 16b06cd8b68..a81527ebedd 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 405234cc851..e42fa6dcc82 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 2ebe3705752..9c45acf88b7 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 e64cc3704b0..e5812ee8a2e 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 7ef5bdfd9d6..4a93b588857 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 b3f16d5e7c4..e6e3729a20d 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 2f48a0f251c..ae60cd2215f 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 7682faa32aa..fa5230f52ee 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 bfae7b42915..18e7cc2a9c6 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 b2e2a1c4a03..8ca55d78ecc 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 553eb25fbbd..87cb4e508b1 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 0156ce1c18c..fc7128e738e 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