Hi Simon,

On Tue, Aug 30, 2011 at 2:05 AM, Simon Glass <s...@chromium.org> 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(-)
>
> diff --git a/common/console.c b/common/console.c
> index 8c650e0..28ddb95 100644
> --- a/common/console.c
> +++ b/common/console.c
> @@ -338,7 +338,7 @@ void putc(const char c)
>        if (gd->flags & GD_FLG_DEVINIT) {
>                /* Send to the standard output */
>                fputc(stdout, c);
> -       } else {
> +       } else if (gd->have_console) {
>                /* Send directly to the handler */
>                serial_putc(c);
>        }
> @@ -359,7 +359,7 @@ void puts(const char *s)
>        if (gd->flags & GD_FLG_DEVINIT) {
>                /* Send to the standard output */
>                fputs(stdout, s);
> -       } else {
> +       } else if (gd->have_console) {
>                /* Send directly to the handler */
>                serial_puts(s);
>        }

Please have a look at my console squelching patches

Regards,

Graeme
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to