All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@mleia.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] serial: lpc32xx: send CR before LF
Date: Sun, 01 Dec 2013 09:11:29 +0200	[thread overview]
Message-ID: <529AE121.7050509@mleia.com> (raw)
In-Reply-To: <201312010006.10565.marex@denx.de>

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<vz@mleia.com>
>>>> Cc: Marek Vasut<marex@denx.de>
>>>> ---
>>>>
>>>>    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.

With best wishes,
Vladimir

  reply	other threads:[~2013-12-01  7:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 14:47 [U-Boot] [PATCH] serial: lpc32xx: send CR before LF Vladimir Zapolskiy
2013-11-30 15:42 ` Marek Vasut
2013-11-30 18:24   ` Vladimir Zapolskiy
2013-11-30 18:31   ` Vladimir Zapolskiy
2013-11-30 23:06     ` Marek Vasut
2013-12-01  7:11       ` Vladimir Zapolskiy [this message]
2013-12-01 15:18         ` Marek Vasut
2013-11-30 20:43   ` Wolfgang Denk
2013-11-30 23:04     ` Marek Vasut
2013-12-16 14:15 ` [U-Boot] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=529AE121.7050509@mleia.com \
    --to=vz@mleia.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.