]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Add NetConsole Support for AMCC eval boards
authorStefan Roese <sr@denx.de>
Thu, 20 Oct 2005 14:34:28 +0000 (16:34 +0200)
committerStefan Roese <sr@denx.de>
Thu, 20 Oct 2005 14:34:28 +0000 (16:34 +0200)
Patch by Stefan Roese, 20 Oct 2005

CHANGELOG
cpu/ppc4xx/4xx_enet.c
include/configs/bamboo.h
include/configs/bubinga.h
include/configs/ebony.h
include/configs/ocotea.h
include/configs/walnut.h
include/configs/yellowstone.h
include/configs/yosemite.h

index 7e6cf3671100101a736b9b73e0899b8c759e076c..2dd56169ba286096805857c3570c6c8e17067f06 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@
 Changes for U-Boot 1.1.4:
 ======================================================================
 
+* Add NetConsole Support for AMCC eval boards
+  Patch by Stefan Roese, 20 Oct 2005
+
 * Fix NetConsole support on 4xx (only print eth link on 1st transfer)
   Patch by Stefan Roese, 18 Oct 2005
 
index 859b72df4fe91597614198518bee5ad1ef3b6e1b..753b2be0c511ba78bc36632961c781d90de90d74 100644 (file)
 #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 */
 
 #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.
@@ -1345,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) {
index 01f86f514147945aac40a26828c15614cc42c018..95f9b5c62e0c9b271c65885c24e9469cf964ec80 100644 (file)
 #define CONFIG_PHY1_ADDR        1
 
 #ifndef CONFIG_BAMBOO_NAND
-#define CONFIG_NET_MULTI        1       /* required for netconsole      */
 #define CONFIG_HAS_ETH1                1       /* add support for "eth1addr"   */
 #endif /* CONFIG_BAMBOO_NAND */
 
 #define CFG_RX_ETH_BUFFER      32      /* Number of ethernet rx buffers & descriptors */
 
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
+#define CONFIG_NET_MULTI        1       /* required for netconsole      */
+
 /* Partitions */
 #define CONFIG_MAC_PARTITION
 #define CONFIG_DOS_PARTITION
index 5feb63a789a12a51d0bf213e03065de7253d75d0..2f99ef044e12ef2eed26ef7c9e002559dd456996 100644 (file)
 #define CONFIG_NET_MULTI       1
 #define CFG_RX_ETH_BUFFER      16      /* Number of ethernet rx buffers & descriptors */
 
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
+
 #define CONFIG_RTC_DS174x      1       /* use DS1743 RTC in Bubinga    */
 
 #define CONFIG_COMMANDS               (CONFIG_CMD_DFL  | \
index 5f608be4c55f77206f356c23d47c08a051dba7a3..8eb4697df7ad9dc773840f67077c50d19ed788eb 100644 (file)
 #define CONFIG_NET_MULTI       1
 #define CFG_RX_ETH_BUFFER      32      /* Number of ethernet rx buffers & descriptors */
 
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
+
 #define CONFIG_COMMANDS               (CONFIG_CMD_DFL  | \
                                CFG_CMD_ASKENV  | \
                                CFG_CMD_DATE    | \
index 5a27c0270636a07f30f55bc87fb30efa96bb325d..49dd4878cb2434e3d8ad31a0fa2f110e1d286797 100644 (file)
 #define CONFIG_ZERO_BOOTDELAY_CHECK    /* check for keypress on bootdelay==0 */
 #define CONFIG_VERSION_VARIABLE 1      /* include version env variable */
 
-#define CFG_RX_ETH_BUFFER      32        /* Number of ethernet rx buffers & descriptors */
+#define CFG_RX_ETH_BUFFER      32      /* Number of ethernet rx buffers & descriptors */
+
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
 
 /*-----------------------------------------------------------------------
  * PCI stuff
index d33956d385a03137768d712eb3a47eb9034f4bc9..6dbce5788c42bfc2a25b56903536cade5c6dc9b2 100644 (file)
 
 #define CFG_RX_ETH_BUFFER      16      /* use 16 rx buffer on 405 emac */
 
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
+#define CONFIG_NET_MULTI               /* needed for NetConsole        */
+
 /*-----------------------------------------------------------------------
  * I2C stuff
  *-----------------------------------------------------------------------
index f2cd053e37127074e586d078bc9da1a721417be2..092959e3372ed5486907dd94c514dcc51a8bfe0f 100644 (file)
 #define CONFIG_HAS_ETH1                1       /* add support for "eth1addr"   */
 #define CONFIG_PHY_ADDR                1       /* PHY address, See schematics  */
 
-#define CFG_RX_ETH_BUFFER      32        /* Number of ethernet rx buffers & descriptors */
+#define CFG_RX_ETH_BUFFER      32      /* Number of ethernet rx buffers & descriptors */
+
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
 
 /* Partitions */
 #define CONFIG_MAC_PARTITION
index 141cdb19900b6f4bd0e3a9483b87720d7d1b1b61..d2bba98d00d67520c4bd5b6fd1cc0914fa0ca295 100644 (file)
 #define CONFIG_HAS_ETH1                1       /* add support for "eth1addr"   */
 #define CONFIG_PHY_ADDR                1       /* PHY address, See schematics  */
 
-#define CFG_RX_ETH_BUFFER      32        /* Number of ethernet rx buffers & descriptors */
+#define CFG_RX_ETH_BUFFER      32      /* Number of ethernet rx buffers & descriptors */
+
+#define CONFIG_NETCONSOLE              /* include NetConsole support   */
 
 /* Partitions */
 #define CONFIG_MAC_PARTITION