summaryrefslogtreecommitdiffstats
path: root/cpu/mcf52x2/fec.c
diff options
context:
space:
mode:
authorZachary P. Landau <zachary.landau@labxtechnologies.com>2006-01-26 17:35:56 -0500
committerZachary P. Landau <zachary.landau@labxtechnologies.com>2006-01-26 17:35:56 -0500
commiteacbd317757327e8e7f018f5701c950429c4c6ae (patch)
treef5a0b6fffe7391bd7c2cf3165b0b1c7171a5df84 /cpu/mcf52x2/fec.c
parentc4b465f63e3b6fc998526dc217ff988e5c91e667 (diff)
downloadblackbird-obmc-uboot-eacbd317757327e8e7f018f5701c950429c4c6ae.tar.gz
blackbird-obmc-uboot-eacbd317757327e8e7f018f5701c950429c4c6ae.zip
Add support for Freescale M5271 processor
Diffstat (limited to 'cpu/mcf52x2/fec.c')
-rw-r--r--cpu/mcf52x2/fec.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/cpu/mcf52x2/fec.c b/cpu/mcf52x2/fec.c
index a5c50af63c..f207dd6acb 100644
--- a/cpu/mcf52x2/fec.c
+++ b/cpu/mcf52x2/fec.c
@@ -25,6 +25,11 @@
#include <malloc.h>
#include <asm/fec.h>
+#ifdef CONFIG_M5271
+#include <asm/m5271.h>
+#include <asm/immap_5271.h>
+#endif
+
#ifdef CONFIG_M5272
#include <asm/m5272.h>
#include <asm/immap_5272.h>
@@ -41,7 +46,7 @@
#ifdef CONFIG_M5272
#define FEC_ADDR (CFG_MBAR + 0x840)
#endif
-#ifdef CONFIG_M5282
+#if defined(CONFIG_M5282) || defined(CONFIG_M5271)
#define FEC_ADDR (CFG_MBAR + 0x1000)
#endif
@@ -240,10 +245,22 @@ int eth_init (bd_t * bd)
#endif
#undef ea
+#ifdef CONFIG_M5271
+ /* Clear multicast address hash table
+ */
+ fecp->fec_ghash_table_high = 0;
+ fecp->fec_ghash_table_low = 0;
+
+ /* Clear individual address hash table
+ */
+ fecp->fec_ihash_table_high = 0;
+ fecp->fec_ihash_table_low = 0;
+#else
/* Clear multicast address hash table
*/
fecp->fec_hash_table_high = 0;
fecp->fec_hash_table_low = 0;
+#endif
/* Set maximum receive buffer size.
*/
@@ -295,6 +312,9 @@ int eth_init (bd_t * bd)
fecp->fec_x_cntrl = FEC_TCNTRL_FDEN;
#else /* Half duplex mode */
fecp->fec_r_cntrl = FEC_RCNTRL_MII_MODE | FEC_RCNTRL_DRT;
+#ifdef CONFIG_M5271
+ fecp->fec_r_cntrl |= (PKT_MAXBUF_SIZE << 16); /* set max frame length */
+#endif
fecp->fec_x_cntrl = 0;
#endif
/* Set MII speed */
OpenPOWER on IntegriCloud