From a93316c5e9d79a1d2358d43af8d287ee28596028 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Tue, 18 Oct 2005 19:17:12 +0200 Subject: Fix NetConsole support on 4xx (only print eth link on 1st transfer) Patch by Stefan Roese, 18 Oct 2005 --- CHANGELOG | 3 +++ cpu/ppc4xx/4xx_enet.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 33cd983..7e6cf36 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.4: ====================================================================== +* Fix NetConsole support on 4xx (only print eth link on 1st transfer) + Patch by Stefan Roese, 18 Oct 2005 + * Add fat & ext2 support to AMCC 440EP boards Yosemite & Bamboo. Fix identation on ext2ls help entry. Patch by Stefan Roese, 14 Oct 2005 diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index d3f1de4..859b72d 100644 --- a/cpu/ppc4xx/4xx_enet.c +++ b/cpu/ppc4xx/4xx_enet.c @@ -186,7 +186,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; } -- cgit v1.1 From 1e25f957c845878bf3f71425f2f5d2baef897470 Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 20 Oct 2005 16:34:28 +0200 Subject: Add NetConsole Support for AMCC eval boards Patch by Stefan Roese, 20 Oct 2005 --- CHANGELOG | 3 +++ cpu/ppc4xx/4xx_enet.c | 23 ++++++++++++++++++----- include/configs/bamboo.h | 4 +++- include/configs/bubinga.h | 2 ++ include/configs/ebony.h | 2 ++ include/configs/ocotea.h | 4 +++- include/configs/walnut.h | 3 +++ include/configs/yellowstone.h | 4 +++- include/configs/yosemite.h | 4 +++- 9 files changed, 40 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7e6cf36..2dd5616 100644 --- 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 diff --git a/cpu/ppc4xx/4xx_enet.c b/cpu/ppc4xx/4xx_enet.c index 859b72d..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. @@ -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) { diff --git a/include/configs/bamboo.h b/include/configs/bamboo.h index 01f86f5..95f9b5c 100644 --- a/include/configs/bamboo.h +++ b/include/configs/bamboo.h @@ -278,12 +278,14 @@ #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 diff --git a/include/configs/bubinga.h b/include/configs/bubinga.h index 5feb63a..2f99ef0 100644 --- a/include/configs/bubinga.h +++ b/include/configs/bubinga.h @@ -132,6 +132,8 @@ #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 | \ diff --git a/include/configs/ebony.h b/include/configs/ebony.h index 5f608be..8eb4697 100644 --- a/include/configs/ebony.h +++ b/include/configs/ebony.h @@ -197,6 +197,8 @@ #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 | \ diff --git a/include/configs/ocotea.h b/include/configs/ocotea.h index 5a27c02..49dd487 100644 --- a/include/configs/ocotea.h +++ b/include/configs/ocotea.h @@ -269,7 +269,9 @@ #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 diff --git a/include/configs/walnut.h b/include/configs/walnut.h index d33956d..6dbce57 100644 --- a/include/configs/walnut.h +++ b/include/configs/walnut.h @@ -163,6 +163,9 @@ #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 *----------------------------------------------------------------------- diff --git a/include/configs/yellowstone.h b/include/configs/yellowstone.h index f2cd053..092959e 100644 --- a/include/configs/yellowstone.h +++ b/include/configs/yellowstone.h @@ -200,7 +200,9 @@ #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 diff --git a/include/configs/yosemite.h b/include/configs/yosemite.h index 141cdb1..d2bba98 100644 --- a/include/configs/yosemite.h +++ b/include/configs/yosemite.h @@ -200,7 +200,9 @@ #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 -- cgit v1.1 From c4c13df284cb06156c16ee6aef49b8d23be3fadd Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 20 Oct 2005 16:36:44 +0200 Subject: Fix problem with sleep in NetConsole (use get_timer()) Patch by Stefan Roese, 20 Oct 2005 --- CHANGELOG | 3 +++ common/cmd_misc.c | 17 ++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2dd5616..a063a01 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.4: ====================================================================== +* Fix problem with sleep in NetConsole (use get_timer()) + Patch by Stefan Roese, 20 Oct 2005 + * Add NetConsole Support for AMCC eval boards Patch by Stefan Roese, 20 Oct 2005 diff --git a/common/cmd_misc.c b/common/cmd_misc.c index 674eafc..67ee9e8 100644 --- a/common/cmd_misc.c +++ b/common/cmd_misc.c @@ -31,6 +31,7 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { + ulong start = get_timer(0); ulong delay; if (argc != 2) { @@ -38,20 +39,18 @@ int do_sleep (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } - delay = simple_strtoul(argv[1], NULL, 10); + delay = simple_strtoul(argv[1], NULL, 10) * CFG_HZ; - while (delay) { - int i; - for (i=0; i<1000; ++i) { - if (ctrlc ()) { - return (-1); - } - udelay (1000); + while (get_timer(start) < delay) { + if (ctrlc ()) { + return (-1); } - --delay; + udelay (100); } + return 0; } + /* Implemented in $(CPU)/interrupts.c */ #if (CONFIG_COMMANDS & CFG_CMD_IRQ) int do_irqinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]); -- cgit v1.1 From a547775bac812f32371f1c3871bc18b40f03aaed Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 20 Oct 2005 16:39:16 +0200 Subject: Fix conflicting types (flash_write()) in esd auto_update.c Patch by Stefan Roese, 20 Oct 2005 --- CHANGELOG | 3 +++ board/esd/common/auto_update.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a063a01..a97b24d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.4: ====================================================================== +* Fix conflicting types (flash_write()) in esd auto_update.c + Patch by Stefan Roese, 20 Oct 2005 + * Fix problem with sleep in NetConsole (use get_timer()) Patch by Stefan Roese, 20 Oct 2005 diff --git a/board/esd/common/auto_update.c b/board/esd/common/auto_update.c index 1dceb3a..d48e972 100644 --- a/board/esd/common/auto_update.c +++ b/board/esd/common/auto_update.c @@ -65,7 +65,7 @@ extern int transfer_pic(unsigned char, unsigned char *, int, int); #endif extern int flash_sect_erase(ulong, ulong); extern int flash_sect_protect (int, ulong, ulong); -extern int flash_write (uchar *, ulong, ulong); +extern int flash_write (char *, ulong, ulong); /* change char* to void* to shutup the compiler */ extern block_dev_desc_t *get_dev (char*, int); -- cgit v1.1 From e9f1110051c2c2f8c005cf7fae54194f07197bac Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Thu, 20 Oct 2005 16:40:17 +0200 Subject: Add missing 4xx board to MAKEALL Patch by Stefan Roese, 20 Oct 2005 --- CHANGELOG | 3 +++ MAKEALL | 21 +++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index a97b24d..9867e8a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,9 @@ Changes for U-Boot 1.1.4: ====================================================================== +* Add missing 4xx board to MAKEALL + Patch by Stefan Roese, 20 Oct 2005 + * Fix conflicting types (flash_write()) in esd auto_update.c Patch by Stefan Roese, 20 Oct 2005 diff --git a/MAKEALL b/MAKEALL index 0656c51..41892f8 100755 --- a/MAKEALL +++ b/MAKEALL @@ -63,16 +63,17 @@ LIST_8xx=" \ LIST_4xx=" \ ADCIOP AP1000 AR405 ASH405 \ bubinga CANBT CPCI2DP CPCI405 \ - CPCI4052 CPCI405AB CPCI440 CPCIISER4 \ - CRAYL1 csb272 csb472 DASA_SIM \ - DP405 DU405 ebony ERIC \ - EXBITGEN G2000 HUB405 JSE \ - KAREF METROBOX MIP405 MIP405T \ - ML2 ml300 ocotea OCRTC \ - ORSG PCI405 PIP405 PLU405 \ - PMC405 PPChameleonEVB sbc405 VOH405 \ - W7OLMC W7OLMG walnut WUH405 \ - XPEDITE1K yellowstone yosemite \ + CPCI4052 CPCI405AB CPCI405DT CPCI440 \ + CPCIISER4 CRAYL1 csb272 csb472 \ + DASA_SIM DP405 DU405 ebony \ + ERIC EXBITGEN G2000 HH405 \ + HUB405 JSE KAREF METROBOX \ + MIP405 MIP405T ML2 ml300 \ + ocotea OCRTC ORSG PCI405 \ + PIP405 PLU405 PMC405 PPChameleonEVB \ + sbc405 VOH405 W7OLMC W7OLMG \ + walnut WUH405 XPEDITE1K yellowstone \ + yosemite \ " ######################################################################### -- cgit v1.1