From d1cbe85b084ce543ba0b09def03a1b20940e6c03 Mon Sep 17 00:00:00 2001 From: wdenk Date: Sat, 28 Jun 2003 17:24:46 +0000 Subject: Merge from "stable branch", tag LABEL_2003_06_28_1800-stable: - Allow to call sysmon function interactively - PIC on LWMON board needs delay after power-on - Add missing RSR definitions for MPC8xx - Improve log buffer handling: guarantee clean reset after power-on - Add support for EXBITGEN board - Add support for SL8245 board --- common/cmd_log.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'common') diff --git a/common/cmd_log.c b/common/cmd_log.c index b07dc75..8132570 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -74,18 +74,24 @@ 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_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; - if (*ext_tag!=LOGBUFF_MAGIC) { +#ifdef CONFIG_POST + /* The post routines have setup the word so we can simply test it */ + if (post_word_load () & 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); + } +#endif /* Initialize default loglevel if present */ if ((s = getenv ("loglevel")) != NULL) console_loglevel = (int)simple_strtoul (s, NULL, 10); -- cgit v1.1