public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4] Add board_pre_console_putc to deal with early console output
Date: Sun, 04 Dec 2011 19:56:05 +0100	[thread overview]
Message-ID: <4EDBC245.1070504@denx.de> (raw)
In-Reply-To: <CAPnjgZ0ZZXiDSt-aaXaUArUmTPp7z75W85QqXQ7+Nq3A90McLg@mail.gmail.com>

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
=====================================================================

  reply	other threads:[~2011-12-04 18:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 22:57 [U-Boot] [PATCH v3] Add board_pre_console_putc to deal with early console output Simon Glass
2011-10-18 23:31 ` Graeme Russ
2011-10-18 23:37   ` Simon Glass
2011-10-18 23:43 ` [U-Boot] [PATCH v4] " Simon Glass
2011-10-18 23:50   ` Graeme Russ
2011-11-25  7:35     ` Simon Glass
2011-11-25 11:53       ` Stefano Babic
2011-11-28 18:56         ` Simon Glass
2011-12-02 17:09   ` Stefano Babic
2011-12-02 18:16     ` Simon Glass
2011-12-04 18:56       ` Stefano Babic [this message]
2011-12-05  3:34         ` Simon Glass
2011-12-05  3:40           ` Graeme Russ
2011-12-05  4:31             ` Simon Glass
2011-12-05  4:35               ` Graeme Russ
2011-12-07 18:20                 ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EDBC245.1070504@denx.de \
    --to=sbabic@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox