[U-Boot] [PATCH] tegra: Specify debugging serial port at boot.

Simon Glass sjg at chromium.org
Wed Mar 21 18:50:19 CET 2012

Hi Stephen,

On Wed, Mar 21, 2012 at 10:38 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:
> On 03/21/2012 11:13 AM, Simon Glass wrote:
>> Hi Stephen,
>> On Wed, Mar 21, 2012 at 10:09 AM, Stephen Warren <swarren at wwwdotorg.org> wrote:
>>> On 03/21/2012 10:59 AM, Simon Glass wrote:
>>>> 3. What you propose is actually very easy to implement - it just
>>>> requires a new config like CONFIG_DEFAULT_UART or
>>>> CONFIG_PRE_CONSOLE_UART to be defined, and used in the
>>>> board_pre_console_putc() code.
>>> One question here: We already have CONFIG_TEGRA2_ENABLE_UART* and
>>> CONFIG_SYS_NS16550_COM* to select which UART to use. Surely one of those
>>> is appropriate for this, rather than inventing yet another config option?
>> These will only exist when CONFIG_OF_CONTROL is not defined. It might
>> confusing to use the same CONFIGs for the pre-console panic() case,
>> knowing that they will in fact be ignored in a normal boot. I would
>> suggest a new option, at least in the CONFIG_OF_CONTROL case where the
>> two options you mention will not be used.
> Oh.
> But in u-boot-tegra/master, both Seaboard and Ventana still set those
> options even though they have CONFIG_OF_CONTROL turned on. And it looks
> like board_init_uart_f() both uses those defines irrespective of
> CONFIG_OF_CONTROL /and/ is called solely based on
> CONFIG_BOARD_EARLY_INIT_F (not CONFIG_OF_CONTROL), which is also defined
> for Seaboard and Ventana.

Yes that's true. I have not yet prepared an upstream patch to fix
this. I will get to this one we have USB/I2C in, but in the meantime,
this series will probably nearly apply. The third patch is the main


> I thought the upshot of this discussion was that there wasn't any need
> for any kind of pre-console stuff, either putc, puts/printf or whatever;
> instead, the console should simply be registered as early as possible
> based on the board/config's UART selection?

Not quite - going back to your previous message, if there is a panic
before the console is ready (and in the event of there being no fdt) I
would like to offer a message on a UART selected by a CONFIG.

> (and of course the DT parsed after that console was registered; no need
> for it before)

The DT must be parsed before the console is registered - after all the
DT tells us which is the console.


More information about the U-Boot mailing list