summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-10-18 13:43:20 +0000
committerStefano Babic <sbabic@denx.de>2011-12-09 14:44:22 +0100
commit295d3942b806552503243f5cfb36aec6f1b5a9bf (patch)
tree3af9bc15401300eeaede2b4bc52afe21a6ae23da /include
parentc4eba6ec5c58083b38340724c006294c7a4fe2eb (diff)
downloadtalos-obmc-uboot-295d3942b806552503243f5cfb36aec6f1b5a9bf.tar.gz
talos-obmc-uboot-295d3942b806552503243f5cfb36aec6f1b5a9bf.zip
Add board_pre_console_putc to deal with early console output
This patch adds support for console output before the console is inited. The main purpose of this is to deal with a very early panic() which would otherwise cause a silent hang. A new board_pre_console_putc() function is added to the board API. If provided by the board it will be called in the event of console output before the console is ready. This function should turn on all UARTs and spray the character out if it possibly can. The feature is controlled by a new CONFIG_PRE_CONSOLE_PUTC option. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Graeme Russ <graeme.russ@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h
index 05a658cdf9..5cfdd762dc 100644
--- a/include/common.h
+++ b/include/common.h
@@ -285,6 +285,13 @@ extern ulong monitor_flash_len;
int mac_read_from_eeprom(void);
extern u8 _binary_dt_dtb_start[]; /* embedded device tree blob */
+/*
+ * Called when console output is requested before the console is available.
+ * The board should do its best to get the character out to the user any way
+ * it can.
+ */
+void board_pre_console_putc(int ch);
+
/* common/flash.c */
void flash_perror (int);
OpenPOWER on IntegriCloud