summaryrefslogtreecommitdiff
path: root/common/cmd_log.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-28 17:24:46 +0000
committerwdenk <wdenk>2003-06-28 17:24:46 +0000
commitd1cbe85b084ce543ba0b09def03a1b20940e6c03 (patch)
tree1cbfceb46952e902208d58595d163143d6038e8a /common/cmd_log.c
parent8bde7f776c77b343aca29b8c7b58464d915ac245 (diff)
downloadu-boot-imx-d1cbe85b084ce543ba0b09def03a1b20940e6c03.zip
u-boot-imx-d1cbe85b084ce543ba0b09def03a1b20940e6c03.tar.gz
u-boot-imx-d1cbe85b084ce543ba0b09def03a1b20940e6c03.tar.bz2
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
Diffstat (limited to 'common/cmd_log.c')
-rw-r--r--common/cmd_log.c14
1 files changed, 10 insertions, 4 deletions
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);