From b37c7e5e5c3c80c68f49a31c4308b159bb5bda1a Mon Sep 17 00:00:00 2001 From: wdenk Date: Mon, 30 Jun 2003 16:24:52 +0000 Subject: * Patch by Seb James, 30 Jun 2003: Improve documentation of I2C configuration in README * Fix problems with previous log buffer "fixes" * Fix minor help text issues * "log append" did not append a newline --- common/cmd_log.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'common/cmd_log.c') diff --git a/common/cmd_log.c b/common/cmd_log.c index 813257077..534c67e88 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -74,22 +74,26 @@ static unsigned long *ext_logged_chars; void logbuff_init_ptrs (void) { DECLARE_GLOBAL_DATA_PTR; + unsigned long *ext_tag; char *s; log_buf = (unsigned char *)(gd->bd->bi_memsize-LOGBUFF_LEN); - ext_log_start = (unsigned long *)(log_buf)-3; + ext_tag = (unsigned long *)(log_buf)-4; + ext_log_start = (unsigned long *)(log_buf)-3; ext_log_size = (unsigned long *)(log_buf)-2; ext_logged_chars = (unsigned long *)(log_buf)-1; #ifdef CONFIG_POST /* The post routines have setup the word so we can simply test it */ - if (post_word_load () & POST_POWERON) { + if ((post_word_load () & 0xffff) == POST_POWERON) { logged_chars = log_size = log_start = 0; + *ext_tag = LOGBUFF_MAGIC; } #else /* No post routines, so we do our own checking */ if (post_word_load () != LOGBUFF_MAGIC) { logged_chars = log_size = log_start = 0; post_word_store (LOGBUFF_MAGIC); + *ext_tag = LOGBUFF_MAGIC; } #endif /* Initialize default loglevel if present */ @@ -162,12 +166,8 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (strcmp(argv[1],"append") == 0) { /* Log concatenation of all arguments separated by spaces */ for (i=2; i - append to the logbuffer\n" -- cgit v1.2.3