Hi Wolfgang, On Mon, Oct 17, 2011 at 1:25 PM, Simon Glass <s...@chromium.org> wrote: > Hi Wolfgang, > > On Mon, Oct 17, 2011 at 1:11 PM, Wolfgang Denk <w...@denx.de> wrote: >> Dear Simon Glass, >> >> In message <1314633910-8550-3-git-send-email-...@chromium.org> you wrote: >>> If puts() or printf() is called before the console is ready, U-Boot will >>> either hang or die. This adds a check for this so that debug() can be used >>> in early code without concern that it will hang. >>> >>> U-Boot boots properly >>> >>> Tested-by: Simon Glass <s...@chromium.org> >>> Signed-off-by: Simon Glass <s...@chromium.org> >>> --- >>> common/console.c | 4 ++-- >>> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> Isn't this just hushing up implementation errors? >> >> Before, the incorrect call would cause U-Boot to fail - a situation >> which cannot be overlooked during the port, so the problem will >> quickly be analyzed and fixed. >> >> With your commit, everything appears to work fine, just some >> (expected) output will be missing. This is misleading at beats, and >> will cause that buggy code will go undetected for a long time. >> >> I don't think this is a good strategy. >> >> Please comment. > > Yes indeed - I did actually submit an 'early panic' patch which I > should take another look at - it is called 'Add board_panic_no_console > to deal with early critical errors'. I think it was in the same patch > set but I'm not sure. > > It would panic when console output was performed before the console > was ready - and therefore give the behaviour you desire.
I took another look at this - in fact this patch has been entirely superseded by Graeme's: commit e3e454cd72f319908355427b1a3ae54b3dd53356 Author: Graeme Russ <graeme.r...@gmail.com> Date: Mon Aug 29 02:14:05 2011 +0000 console: Squelch pre-console output in console functions so there is no need for me to resubmit. The other patch I mentioned, The board_panic_no_console patch is still of interest though. Regards, Simon > >> >> Best regards, >> >> Wolfgang Denk >> >> -- >> DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel >> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany >> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de >> Compassion -- that's the one things no machine ever had. Maybe it's >> the one thing that keeps men ahead of them. >> -- McCoy, "The Ultimate Computer", stardate 4731.3 >> > _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot