projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
85xx: Add some L1/L2 SPR register definitions
[oweals/u-boot.git]
/
common
/
cmd_log.c
diff --git
a/common/cmd_log.c
b/common/cmd_log.c
index 34b36ff1dd8d31ff99781ef2ae52e5b7c95ef7ec..fdcc57571aa9d43a3a0ce849aa03ae453bf09c56 100644
(file)
--- a/
common/cmd_log.c
+++ b/
common/cmd_log.c
@@
-66,6
+66,12
@@
static logbuff_t *log;
#endif
static char *lbuf;
#endif
static char *lbuf;
+unsigned long __logbuffer_base(void)
+{
+ return CFG_SDRAM_BASE + gd->bd->bi_memsize - LOGBUFF_LEN;
+}
+unsigned long logbuffer_base (void) __attribute__((weak, alias("__logbuffer_base")));
+
void logbuff_init_ptrs (void)
{
unsigned long tag, post_word;
void logbuff_init_ptrs (void)
{
unsigned long tag, post_word;
@@
-75,8
+81,8
@@
void logbuff_init_ptrs (void)
log = (logbuff_t *)CONFIG_ALT_LH_ADDR;
lbuf = (char *)CONFIG_ALT_LB_ADDR;
#else
log = (logbuff_t *)CONFIG_ALT_LH_ADDR;
lbuf = (char *)CONFIG_ALT_LB_ADDR;
#else
- log = (logbuff_t *)(
gd->bd->bi_memsize-LOGBUFF_LEN
) - 1;
- lbuf = log->buf;
+ log = (logbuff_t *)(
logbuffer_base ()
) - 1;
+ lbuf =
(char *)
log->buf;
#endif
/* Set up log version */
#endif
/* Set up log version */
@@
-107,7
+113,7
@@
void logbuff_init_ptrs (void)
if ((s = getenv ("loglevel")) != NULL)
console_loglevel = (int)simple_strtoul (s, NULL, 10);
if ((s = getenv ("loglevel")) != NULL)
console_loglevel = (int)simple_strtoul (s, NULL, 10);
- gd->
post_log_word |= LOGBUFF_INITIALIZED
;
+ gd->
flags |= GD_FLG_LOGINIT
;
}
void logbuff_reset (void)
}
void logbuff_reset (void)
@@
-168,7
+174,7
@@
static void logbuff_puts (const char *s)
void logbuff_log(char *msg)
{
void logbuff_log(char *msg)
{
- if ((gd->
post_log_word & LOGBUFF_INITIALIZED
)) {
+ if ((gd->
flags & GD_FLG_LOGINIT
)) {
logbuff_printk (msg);
} else {
/* Can happen only for pre-relocated errors as logging */
logbuff_printk (msg);
} else {
/* Can happen only for pre-relocated errors as logging */