
On 19/10/2011 01:43, Simon Glass wrote:
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
Hi Simon,
Changes in v2:
- Made this feature conditional on CONFIG_PRE_CONSOLE_PANIC
Changes in v3:
- Rewrite this to be independent of panic()
- Rename feature to CONFIG_PRE_CONSOLE_PUTC
Changes in v4:
- Remove weak function, so we get a link error if it is undefined by the board
maybe I have not understood the real goal of this patch. We have already a CONFIG_PRE_CONSOLE_BUFFER, that tries to store the output when the console is not avalable - and can be retrieved with a JTAG debugger.
Your patch adds a way to call some serial setup in board code, but it is not said that works or can work for all / most boards. Compared to the usage of the circular buffer, it is not so general - am I missing something ?
Best regards, Stefano Babic