lkml.org 
[lkml]   [2010]   [Mar]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] serial: Two branches the same in timbuart_set_mctrl()
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. If undesired we need something like this:

iowrite8(ioread8(port->membase + TIMBUART_CTRL) & ~TIMBUART_CTRL_RTS,
port->membase + TIMBUART_CTRL);

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

Regards, Roel


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