[U-Boot] [PATCH v4] Add board_pre_console_putc to deal with early console output

Stefano Babic sbabic at denx.de
Sun Dec 4 19:56:05 CET 2011


On 02/12/2011 19:16, Simon Glass wrote:

> It actually started as a last-ditch panic message printer. It morphed
> into the general pre-console putc after discussions on the list (with
> Graeme).
> 
> It can happen that your early board code does not know what clocks to
> use, or can't find a console, or some other critical error. It then
> calls panic() which silently dies or maybe reboots if you are lucky.
> This problem mostly comes about with device trees, where we must have
> certain info in the device tree before we can even get to relocation.
> 
> The idea is that boards provide a way of outputting characters which
> tries to work on all types of boards with that SOC. For example, they
> output the characters on all UARTs with various clock options, etc.
> 
> We use it on Tegra to print a friendly panic message when something is
> horribly wrong. In this case we will never make it to relocation so
> the pre-console buffer will not be displayed. So we can't rely on
> that.

I do not know if this mechanism can be used on other SOCs, but IMHO it
does not hurt and it helps at least on Tegra, as you explained me.

Applied to u-boot-staging, sbabic at denx.de branch

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list