summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2002-12-08 09:53:23 +0000
committerwdenk <wdenk>2002-12-08 09:53:23 +0000
commit228f29ac6e0026e596b3a6fbb640118b9944cdd8 (patch)
treef379b80d2d4be7cf9f25bd59156e53cb00faaf72 /common/cmd_bootm.c
parent7c7a23bd5a0bc149d2edd665ec46381726b24e0c (diff)
downloadu-boot-imx-228f29ac6e0026e596b3a6fbb640118b9944cdd8.zip
u-boot-imx-228f29ac6e0026e596b3a6fbb640118b9944cdd8.tar.gz
u-boot-imx-228f29ac6e0026e596b3a6fbb640118b9944cdd8.tar.bz2
* Improve log buffer code; use "loglevel" to decide which messages
to log on the console, too (like in Linux); get rid of "logstart"
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 4c0d1f5..2cf625d 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -51,6 +51,10 @@
#include <asm/cache.h>
#endif
+#ifdef CONFIG_LOGBUFFER
+#include <logbuff.h>
+#endif
+
/*
* Some systems (for example LWMON) have very short watchdog periods;
* we must make sure to split long operations like memmove() or
@@ -357,19 +361,15 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
* turning the "load high" feature off. This is intentional.
*/
initrd_high = simple_strtoul(s, NULL, 16);
- } else { /* not set, no restrictions to load high */
+ } else { /* not set, no restrictions to load high */
initrd_high = ~0;
}
#ifdef CONFIG_LOGBUFFER
- kbd=gd->bd;
- if ((s = getenv ("logstart")) != NULL) {
- kbd->bi_sramstart = simple_strtoul(s, NULL, 16);
- /* Prevent initrd from overwriting logbuffer */
- if (initrd_high < kbd->bi_sramstart)
- initrd_high = kbd->bi_sramstart-1024;
- }
- debug ("## Logbuffer at 0x%08lX ", kbd->bi_sramstart);
+ /* Prevent initrd from overwriting logbuffer */
+ if (initrd_high < (kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD))
+ initrd_high = kbd->bi_memsize-LOGBUFF_LEN-LOGBUFF_OVERHEAD;
+ debug ("## Logbuffer at 0x%08lX ", kbd->bi_memsize-LOGBUFF_LEN);
#endif
/*