[U-Boot] [PATCH 1/7] dm: serial: fix a bug of console putc

Masahiro Yamada yamada.m at jp.panasonic.com
Thu Oct 23 15:28:32 CEST 2014


Hi Simon,


On Wed, 22 Oct 2014 17:36:06 -0600
Simon Glass <sjg at chromium.org> wrote:

> >  drivers/serial/serial-uclass.c | 7 ++++++-
> >  1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
> > index 6dde4ea..163308b 100644
> > --- a/drivers/serial/serial-uclass.c
> > +++ b/drivers/serial/serial-uclass.c
> > @@ -127,8 +127,13 @@ void serial_stub_putc(struct stdio_dev *sdev, const char ch)
> >  {
> >         struct udevice *dev = sdev->priv;
> >         struct dm_serial_ops *ops = serial_get_ops(dev);
> > +       int err;
> >
> > -       ops->putc(dev, ch);
> > +       do {
> > +               err = ops->putc(cur_dev, ch);
> > +       } while (err == -EAGAIN);
> > +       if (ch == '\n')
> > +               serial_putc('\r');
> >  }
> >
> >  void serial_stub_puts(struct stdio_dev *sdev, const char *str)
> > --
> > 1.9.1
> >
> 
> Sorry for the bug, but I did fix it some weeks OK. Please see this patch:
> 
> http://patchwork.ozlabs.org/patch/395725/


Hmm, I checked it out, but I am afraid serial_stub_putc() is still buggy.


Please check this:
http://patchwork.ozlabs.org/patch/402479/


Best Regards
Masahiro Yamada



More information about the U-Boot mailing list