[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] serial: Two branches the same in timbuart_set_mctrl()
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_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!


 \ /
  Last update: 2010-03-15 14:45    [W:0.037 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site