From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 1 Dec 2013 16:18:11 +0100 Subject: [U-Boot] [PATCH] serial: lpc32xx: send CR before LF In-Reply-To: <529AE121.7050509@mleia.com> References: <1385822821-7465-1-git-send-email-vz@mleia.com> <201312010006.10565.marex@denx.de> <529AE121.7050509@mleia.com> Message-ID: <201312011618.11589.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 Dear Vladimir Zapolskiy, > Dear Marek Vasut, > > On 12/01/13 01:06, Marek Vasut wrote: > > Dear Vladimir Zapolskiy, > > > >> On 11/30/13 17:42, Marek Vasut wrote: > >>> Dear Vladimir Zapolskiy, > >>> > >>>> For LPC32XX high-speed UART it is required to send a carriage return > >>>> symbol along with line feed. > >>> > >>> Why ? > >>> > >>>> The problem was introduced in e503f90a > >>>> commit. > >>>> > >>>> Signed-off-by: Vladimir Zapolskiy > >>>> Cc: Marek Vasut > >>>> --- > >>>> > >>>> drivers/serial/lpc32xx_hsuart.c | 3 +++ > >>>> 1 file changed, 3 insertions(+) > >>>> > >>>> diff --git a/drivers/serial/lpc32xx_hsuart.c > >>>> b/drivers/serial/lpc32xx_hsuart.c index 9c7c621..c8926a8 100644 > >>>> --- a/drivers/serial/lpc32xx_hsuart.c > >>>> +++ b/drivers/serial/lpc32xx_hsuart.c > >>>> @@ -38,6 +38,9 @@ static int lpc32xx_serial_getc(void) > >>>> > >>>> static void lpc32xx_serial_putc(const char c) > >>>> { > >>>> > >>>> + if (c == '\n') > >>>> + serial_putc('\r'); > >>>> + > >>>> > >>>> writel(c,&hsuart->tx); > >>>> > >>>> /* Wait for character to be sent */ > >>> > >>> btw. I have a feeling each and every driver does send CR-LF combo and > >>> emulates it this way. Maybe this should eventually go into common code > >>> ? But that's just a suggestion for future improvement. > >> > >> No objections from my side, however it seems that not every particular > >> serial > >> controller requires such a hook, for code generalization it may be good > >> to have > >> it for all drivers, but strict enforcement may be redundant for some > >> subset. > > > > This would need further investigation, very detailed one. > > if you anticipate that such investigation and testing will take significant > amount of time, I'd be glad, if you let the regression fix in before doing > code generalization. By all means, Acked-by: Marek Vasut Best regards, Marek Vasut