diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-21 22:41:25 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2005-10-21 22:41:25 +0200 |
commit | 7b5cac0e1958173a390ae6d620a610028cad25f8 (patch) | |
tree | d045cc641164a0eca524a862831921790abb43eb /cpu | |
parent | 6902df56a0b493f369153b09d11afcd74a580561 (diff) | |
parent | e9f1110051c2c2f8c005cf7fae54194f07197bac (diff) | |
download | u-boot-7b5cac0e1958173a390ae6d620a610028cad25f8.zip u-boot-7b5cac0e1958173a390ae6d620a610028cad25f8.tar.gz u-boot-7b5cac0e1958173a390ae6d620a610028cad25f8.tar.bz2 |
Merge with /home/wd/git/u-boot/master
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/ppc4xx/4xx_enet.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index d3f1de4..753b2be 100644 --- a/cpu/ppc4xx/4xx_enet.c +++ b/cpu/ppc4xx/4xx_enet.c @@ -100,6 +100,10 @@ #error "CONFIG_MII has to be defined!" #endif +#if defined(CONFIG_NETCONSOLE) && !defined(CONFIG_NET_MULTI) +#error "CONFIG_NET_MULTI has to be defined for NetConsole" +#endif + #define EMAC_RESET_TIMEOUT 1000 /* 1000 ms reset timeout */ #define PHY_AUTONEGOTIATE_TIMEOUT 4000 /* 4000 ms autonegotiate timeout */ @@ -111,10 +115,6 @@ #define ENET_MAX_MTU PKTSIZE #define ENET_MAX_MTU_ALIGNED PKTSIZE_ALIGN -/* define the number of channels implemented */ -#define EMAC_RXCHL EMAC_NUM_DEV -#define EMAC_TXCHL EMAC_NUM_DEV - /*-----------------------------------------------------------------------------+ * Defines for MAL/EMAC interrupt conditions as reported in the UIC (Universal * Interrupt Controller). @@ -142,6 +142,19 @@ static uint32_t mal_ier; struct eth_device *emac0_dev = NULL; #endif +/* + * Get count of EMAC devices (doesn't have to be the max. possible number + * supported by the cpu) + */ +#if defined(CONFIG_HAS_ETH3) +#define LAST_EMAC_NUM 4 +#elif defined(CONFIG_HAS_ETH2) +#define LAST_EMAC_NUM 3 +#elif defined(CONFIG_HAS_ETH1) +#define LAST_EMAC_NUM 2 +#else +#define LAST_EMAC_NUM 1 +#endif /*-----------------------------------------------------------------------------+ * Prototypes and externals. @@ -186,7 +199,9 @@ static void ppc_4xx_eth_halt (struct eth_device *dev) /* EMAC RESET */ out32 (EMAC_M0 + hw_p->hw_addr, EMAC_M0_SRST); +#ifndef CONFIG_NETCONSOLE hw_p->print_speed = 1; /* print speed message again next time */ +#endif return; } @@ -1343,7 +1358,7 @@ int ppc_4xx_eth_initialize (bd_t * bis) #endif #endif - for (eth_num = 0; eth_num < EMAC_NUM_DEV; eth_num++) { + for (eth_num = 0; eth_num < LAST_EMAC_NUM; eth_num++) { /* See if we can actually bring up the interface, otherwise, skip it */ switch (eth_num) { |