summaryrefslogtreecommitdiff
path: root/post/cpu/ppc4xx/ether.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-08-14 15:00:42 +0200
committerStefan Roese <sr@denx.de>2007-08-14 15:00:42 +0200
commit34886bbea20b577e8bdef81f3831319f1876b9b7 (patch)
tree06d3819c6f50eda7079645da8db458956a5781f3 /post/cpu/ppc4xx/ether.c
parent273db7e1bdd1937e32f1d4507321bb721ebd3118 (diff)
parent779e975117a75e91fcebe226a63104dbfb924ab1 (diff)
downloadu-boot-imx-34886bbea20b577e8bdef81f3831319f1876b9b7.zip
u-boot-imx-34886bbea20b577e8bdef81f3831319f1876b9b7.tar.gz
u-boot-imx-34886bbea20b577e8bdef81f3831319f1876b9b7.tar.bz2
Merge with /home/stefan/git/u-boot/zeus
Diffstat (limited to 'post/cpu/ppc4xx/ether.c')
-rw-r--r--post/cpu/ppc4xx/ether.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/post/cpu/ppc4xx/ether.c b/post/cpu/ppc4xx/ether.c
index 391c815..ab23ca5 100644
--- a/post/cpu/ppc4xx/ether.c
+++ b/post/cpu/ppc4xx/ether.c
@@ -68,10 +68,10 @@ static char *rx_buf;
static void ether_post_init (int devnum, int hw_addr)
{
int i;
- unsigned mode_reg;
#if defined(CONFIG_440GX) || \
defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
defined(CONFIG_440SP) || defined(CONFIG_440SPE)
+ unsigned mode_reg;
sys_info_t sysinfo;
#endif
#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || defined(CONFIG_440SPE)
@@ -185,10 +185,17 @@ static void ether_post_init (int devnum, int hw_addr)
mtdcr (malrxcasr, (MAL_TXRX_CASR >> devnum));
/* set internal loopback mode */
+#ifdef CFG_POST_ETHER_EXT_LOOPBACK
+ out32 (EMAC_M1 + hw_addr, EMAC_M1_FDE | 0 |
+ EMAC_M1_RFS_4K | EMAC_M1_TX_FIFO_2K |
+ EMAC_M1_MF_100MBPS | EMAC_M1_IST |
+ in32 (EMAC_M1));
+#else
out32 (EMAC_M1 + hw_addr, EMAC_M1_FDE | EMAC_M1_ILE |
EMAC_M1_RFS_4K | EMAC_M1_TX_FIFO_2K |
EMAC_M1_MF_100MBPS | EMAC_M1_IST |
in32 (EMAC_M1));
+#endif
/* set transmit enable & receive enable */
out32 (EMAC_M0 + hw_addr, EMAC_M0_TXE | EMAC_M0_RXE);