[U-Boot] [PATCH v3 7/8] zynq: Move SPL console init out of board_init_f()

Simon Glass sjg at chromium.org
Sun Oct 18 22:37:03 CEST 2015


Hi Albert,

On 18 October 2015 at 10:36, Albert ARIBAUD <albert.u.boot at aribaud.net> wrote:
> Hello Simon,
>
> On Sat, 17 Oct 2015 15:07:00 -0600, Simon Glass <sjg at chromium.org>
> wrote:
>> We should not init the console this early and there is no need to. If we want
>> to do early init it can be done in spl_board_init(). Move the
>> preloader_console_init() call from board_init_f() to board_init_r().
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> Tested-by: Masahiro Yamada <yamada.masahiro at socionext.com>
>> Tested-by: Michal Simek <michal.simek at xilinx.com>
>
> I personally think that we should, almost must in fact, initialize the
> console as early as possible.
>
> What exactly is the drawaback of initializing the console here?

This is described in the README now for SPL. The console is not
available until driver model is ready, which cannot be before
global_data is ready.

My second zynq series removes the next few lines from board_init_f(),
so in effect there is very little difference in timing - the console
still is set up very early. It is just that we must not set it up
before driver model is running.

There is also a debug UART which can be used to make printf() work
before global_data is available. But I'm trying to remove the
global_data hacks that exist in early board code.

Regards,
Simon


More information about the U-Boot mailing list