From 2a3cb0207614427d301a4a6f8041267cada14bd8 Mon Sep 17 00:00:00 2001 From: wdenk Date: Tue, 5 Nov 2002 21:01:48 +0000 Subject: Quick & Dirty fix for log buffer problem when environment is not set Trigger watchdog when reading the env - this might take a while. Set debugging baud rate for KUP4K board --- common/cmd_log.c | 6 +++--- common/cmd_nvedit.c | 3 +++ include/configs/KUP4K.h | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/common/cmd_log.c b/common/cmd_log.c index 2e42f1033..1748aa654 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -92,7 +92,7 @@ void logbuff_log(char *msg) { DECLARE_GLOBAL_DATA_PTR; - if (gd->flags & GD_FLG_RELOC) { + if ((gd->flags & GD_FLG_RELOC)&&(getenv ("logstart") != NULL)) { logbuff_printk(msg); } else { puts(msg); @@ -109,10 +109,10 @@ void logbuff_reset (void) ext_tag=(unsigned long *)(log_buf)-3; ext_log_start=(unsigned long *)(log_buf)-2; ext_logged_chars=(unsigned long *)(log_buf)-1; -// if (*ext_tag!=LOGBUFF_MAGIC) { +/* if (*ext_tag!=LOGBUFF_MAGIC) { */ logged_chars=log_start=0; *ext_tag=LOGBUFF_MAGIC; -// } +/* } */ log_size=logged_chars; } } diff --git a/common/cmd_nvedit.c b/common/cmd_nvedit.c index 08e888c08..0a19ce405 100644 --- a/common/cmd_nvedit.c +++ b/common/cmd_nvedit.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -459,6 +460,8 @@ char *getenv (uchar *name) { int i, nxt; + WATCHDOG_RESET(); + for (i=0; env_get_char(i) != '\0'; i=nxt+1) { int val; diff --git a/include/configs/KUP4K.h b/include/configs/KUP4K.h index 3d9898bb0..7c512ccd6 100644 --- a/include/configs/KUP4K.h +++ b/include/configs/KUP4K.h @@ -41,7 +41,7 @@ #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ #undef CONFIG_8xx_CONS_SMC2 #undef CONFIG_8xx_CONS_NONE -#define CONFIG_BAUDRATE 115200 /* console baudrate = 115kbps */ +#define CONFIG_BAUDRATE 9600 /* console baudrate */ #if 0 #define CONFIG_BOOTDELAY -1 /* autoboot disabled */ #else -- cgit v1.2.3