]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - common/console.c
Revert "Add board_pre_console_putc to deal with early console output"
[karo-tx-uboot.git] / common / console.c
index 1d9fd7ff42bd7ac200bf3b89cbce7afe35ea7b1a..1177f7d396b889effbb9973b77966a013f15ee96 100644 (file)
@@ -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) {}