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

Stephen Warren
2012-03-21T17:38:11Z

On 03/21/2012 11:13 AM, Simon Glass wrote:
> Hi Stephen,
>
> On Wed, Mar 21, 2012 at 10:09 AM, Stephen Warren <swarren@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.

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?

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