diff options
author | Marian Balakowicz <m8@semihalf.com> | 2006-04-27 19:12:19 +0200 |
---|---|---|
committer | Marian Balakowicz <m8@semihalf.com> | 2006-04-27 19:12:19 +0200 |
commit | 7a635e004ec12bd2a0bae9f90fbb5769b524a42e (patch) | |
tree | 9c0b3d146c12454e95395411094d420bc5b4a3d3 /cpu/mcf52x2/fec.c | |
parent | 76544f80e476a7a0cc3a0bbce853354f2c6a61e2 (diff) | |
parent | f8c3b4f310a36e19d00d0f87fb37587abb65621d (diff) | |
download | u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.zip u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.tar.gz u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.tar.bz2 |
Add support for Freescale M5271: Merge with /work/u-boot.mcf5271
Diffstat (limited to 'cpu/mcf52x2/fec.c')
-rw-r--r-- | cpu/mcf52x2/fec.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/cpu/mcf52x2/fec.c b/cpu/mcf52x2/fec.c index a5c50af..f207dd6 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 */ |