From: Alexey Brodkin Date: Wed, 27 Nov 2013 18:32:40 +0000 (+0400) Subject: board_f: explicitly disable console on early boot X-Git-Tag: v2025.01-rc5-pxa1908~15510^2~60 X-Git-Url: http://git.dujemihanovic.xyz/img/static/git-logo.png?a=commitdiff_plain;h=9aed5a277738d7427b1949d75afbf95505c09499;p=u-boot.git board_f: explicitly disable console on early boot If U-Boot build with DEBUG enabled/defined the first call of "debug" function (that dumps data to any available console) will happen before zeroing of initial "gd" in init call "zero_global_data" in "init_sequence_f". And if stack was not filled with zeros chances are high that "gd->have_console" won't be 0. In its turn it will cause attempt to output things to non-initialized yet serial console. So for safety and predictability we set "gd->have_console = 0". Signed-off-by: Alexey Brodkin Cc: Mischa Jonker Cc: Wolfgang Denk Cc: Simon Glass Acked-by: Simon Glass --- diff --git a/common/board_f.c b/common/board_f.c index f0664bc2b2..fcfd713b07 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -1010,6 +1010,7 @@ void board_init_f(ulong boot_flags) #endif gd->flags = boot_flags; + gd->have_console = 0; if (initcall_run_list(init_sequence_f)) hang();