From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Fri, 5 Sep 2014 12:35:18 +0200 Subject: [U-Boot] [PATCH v4 2/6] serial: add UniPhier serial driver In-Reply-To: <1409896223-15994-3-git-send-email-yamada.m@jp.panasonic.com> References: <1409896223-15994-1-git-send-email-yamada.m@jp.panasonic.com> <1409896223-15994-3-git-send-email-yamada.m@jp.panasonic.com> Message-ID: <201409051235.19010.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Friday, September 05, 2014 at 07:50:19 AM, Masahiro Yamada wrote: > The driver for on-chip UART used on Panasonic UniPhier platform. > > Signed-off-by: Masahiro Yamada [...] Hi! > +static void uniphier_serial_putc(struct uniphier_serial *port, const char > c) +{ > + if (c == '\n') > + uniphier_serial_putc(port, '\r'); Just curious, but what is the concensus about inserting \r upon \n ? Shouldn't this be something that the "upper layers" do consistently ? I recall seeing this in some drivers and not seeing this in the others, so I wonder why this is like so ... > + while (!(readb(&port->lsr) & UART_LSR_THRE)) > + ; > + > + writeb(c, &port->thr); > +} [...] Best regards, Marek Vasut