public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Richard Röjfors" <richard.rojfors@pelagicore.com>
To: Roel Kluin <roel.kluin@gmail.com>
Cc: linux-serial@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [PATCH] serial: Two branches the same in timbuart_set_mctrl()
Date: Mon, 15 Mar 2010 14:41:46 +0100	[thread overview]
Message-ID: <4B9E391A.5050808@pelagicore.com> (raw)
In-Reply-To: <4B9E3747.9060400@gmail.com>

On 03/15/2010 02:33 PM, Roel Kluin wrote:
> Hi Richard,
>
>>>        if (mctrl&   TIOCM_RTS)
>>>            iowrite8(TIMBUART_CTRL_RTS, port->membase + TIMBUART_CTRL);
>>>        else
>>> -        iowrite8(TIMBUART_CTRL_RTS, port->membase + TIMBUART_CTRL);
>>> +        iowrite8(TIMBUART_CTRL_CTS, port->membase + TIMBUART_CTRL);
>>
>> This is not completely correct. CTS is a read only bit and we are to
>> stop signal RTS. So the line should look like:
>> iowrite8(0, port->membase + TIMBUART_CTRL);
>
> It appears as if this will also unset TIMBUART_CTRL_CTS (which is
> probably ok since it's read-only) but TIMBUART_CTRL_FLSHTX and
> TIMBUART_CTRL_FLSHRX as well.

TIMBUART_CTRL_FLSH(RX/TX) are write only bits, writing a 1 to these will
flush the corresponding FIFO. In this case we should not flush the FIFO:s,
so writing 0 as I suggested is correct.

>
> If not required I'll send the patch as you suggested.

Great! Thanks!

--Richard

  reply	other threads:[~2010-03-15 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-17 15:29 [PATCH] serial: Two branches the same in timbuart_set_mctrl() Roel Kluin
2010-01-17 18:17 ` Alan Cox
2010-01-17 19:02   ` Roel Kluin
2010-03-15  9:44     ` Richard Röjfors
2010-03-15 13:33       ` Roel Kluin
2010-03-15 13:41         ` Richard Röjfors [this message]
2010-03-15 13:57           ` Roel Kluin

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=4B9E391A.5050808@pelagicore.com \
    --to=richard.rojfors@pelagicore.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=roel.kluin@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox