summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2012-03-19 21:59:14 -0700
committerWolfgang Denk <wd@denx.de>2012-03-23 21:27:32 +0100
commit3fa4977a9ec7a2e1c7f8c098cbd857dec13936d1 (patch)
tree9580fc69fc33278d739e5422eb2fce3963355b06 /common
parent9692fd0f70258709e880ce9b75ef1b2dab55e75a (diff)
Revert "Add board_pre_console_putc to deal with early console output"
This reverts commit 295d3942b806552503243f5cfb36aec6f1b5a9bf. It turns that this really doesn't work very nicely. Instead we should have a pre-console panic function so that we know that further execution is impossible and we don't need to worry about trampling on UARTs, etc. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/console.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/common/console.c b/common/console.c
index 1d9fd7ff42b..1177f7d396b 100644
--- a/common/console.c
+++ b/common/console.c
@@ -329,19 +329,14 @@ int tstc(void)
return serial_tstc();
}
-#if defined(CONFIG_PRE_CONSOLE_BUFFER) || defined(CONFIG_PRE_CONSOLE_PUTC)
+#ifdef CONFIG_PRE_CONSOLE_BUFFER
#define CIRC_BUF_IDX(idx) ((idx) % (unsigned long)CONFIG_PRE_CON_BUF_SZ)
static void pre_console_putc(const char c)
{
-#ifdef CONFIG_PRE_CONSOLE_BUFFER
char *buffer = (char *)CONFIG_PRE_CON_BUF_ADDR;
buffer[CIRC_BUF_IDX(gd->precon_buf_idx++)] = c;
-#endif
-#ifdef CONFIG_PRE_CONSOLE_PUTC
- board_pre_console_putc(c);
-#endif
}
static void pre_console_puts(const char *s)
@@ -352,7 +347,6 @@ static void pre_console_puts(const char *s)
static void print_pre_console_buffer(void)
{
-#ifdef CONFIG_PRE_CONSOLE_BUFFER
unsigned long i = 0;
char *buffer = (char *)CONFIG_PRE_CON_BUF_ADDR;
@@ -361,9 +355,7 @@ static void print_pre_console_buffer(void)
while (i < gd->precon_buf_idx)
putc(buffer[CIRC_BUF_IDX(i++)]);
-#endif
}
-
#else
static inline void pre_console_putc(const char c) {}
static inline void pre_console_puts(const char *s) {}