Hi Wolfgang, On 28/08/11 20:08, Wolfgang Denk wrote: > Dear Graeme Russ,
[snip] > >> So there are drivers that anticipate generating output before console is >> initialised - I think we should not put the onus on the driver and move >> these conditions to printf() in console.c - Unfortunately this could lead >> to head-scratching when one _thinks_ a printf() should generate an output, >> but it is squelched (which is what the pre-console buffer is for) > > Indeed - which is why this code is only used for debugging drivers in > certain very special configurations. So do you think it is worth handling this in printf() as suggested? I do wonder what unforeseen consequences there can be for an unintended printf() before console has been initialised. I know that a plain-old 16550 will just output garbage because the baud rate is not set, but I wonder if other cases exist where totally unexpected (and unwanted) behaviour will occur because the hardware is not setup yet. I think the safe option is to squelch it in printf(), puts() and putc(). At least then you are only left wondering why something did not print rather than why you hardware is behaving oddly. And with the pre-console buffer (if you can squeeze it in) you automagically get those messages as soon as the console is ready. Regards, Graeme _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot