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
master
wdenk 22 years ago
parent 56f94be3ef
commit 2a3cb02076
  1. 6
      common/cmd_log.c
  2. 3
      common/cmd_nvedit.c
  3. 2
      include/configs/KUP4K.h

@ -92,7 +92,7 @@ void logbuff_log(char *msg)
{ {
DECLARE_GLOBAL_DATA_PTR; DECLARE_GLOBAL_DATA_PTR;
if (gd->flags & GD_FLG_RELOC) { if ((gd->flags & GD_FLG_RELOC)&&(getenv ("logstart") != NULL)) {
logbuff_printk(msg); logbuff_printk(msg);
} else { } else {
puts(msg); puts(msg);
@ -109,10 +109,10 @@ void logbuff_reset (void)
ext_tag=(unsigned long *)(log_buf)-3; ext_tag=(unsigned long *)(log_buf)-3;
ext_log_start=(unsigned long *)(log_buf)-2; ext_log_start=(unsigned long *)(log_buf)-2;
ext_logged_chars=(unsigned long *)(log_buf)-1; ext_logged_chars=(unsigned long *)(log_buf)-1;
// if (*ext_tag!=LOGBUFF_MAGIC) { /* if (*ext_tag!=LOGBUFF_MAGIC) { */
logged_chars=log_start=0; logged_chars=log_start=0;
*ext_tag=LOGBUFF_MAGIC; *ext_tag=LOGBUFF_MAGIC;
// } /* } */
log_size=logged_chars; log_size=logged_chars;
} }
} }

@ -42,6 +42,7 @@
#include <common.h> #include <common.h>
#include <command.h> #include <command.h>
#include <environment.h> #include <environment.h>
#include <watchdog.h>
#include <cmd_nvedit.h> #include <cmd_nvedit.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
@ -459,6 +460,8 @@ char *getenv (uchar *name)
{ {
int i, nxt; int i, nxt;
WATCHDOG_RESET();
for (i=0; env_get_char(i) != '\0'; i=nxt+1) { for (i=0; env_get_char(i) != '\0'; i=nxt+1) {
int val; int val;

@ -41,7 +41,7 @@
#define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */ #define CONFIG_8xx_CONS_SMC1 1 /* Console is on SMC1 */
#undef CONFIG_8xx_CONS_SMC2 #undef CONFIG_8xx_CONS_SMC2
#undef CONFIG_8xx_CONS_NONE #undef CONFIG_8xx_CONS_NONE
#define CONFIG_BAUDRATE 115200 /* console baudrate = 115kbps */ #define CONFIG_BAUDRATE 9600 /* console baudrate */
#if 0 #if 0
#define CONFIG_BOOTDELAY -1 /* autoboot disabled */ #define CONFIG_BOOTDELAY -1 /* autoboot disabled */
#else #else

Loading…
Cancel
Save