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

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Oct 19 07:15:19 CEST 2015


Hello Simon,

On Sun, 18 Oct 2015 14:37:03 -0600, Simon Glass <sjg at chromium.org>
wrote:
> 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.

Makes sense now.

Maybe the commit message could explicitly mention that the cause of the
"should not" is the driver model? This commit might be viewed in
isolation and the reader may need a clue on how to relate that commit
to the driver model or the README.

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

Then my initial concern is address (and again, maybe a small note in
the commit message could remind the reader about the debug UART not
being affected by the commit). Thanks!

> Regards,
> Simon

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list