Re: [PATCH] serial: imx: leave IRTS disabled if using modem-control CTS

From: Tomasz Moń
Date: Tue Feb 15 2022 - 01:10:14 EST


On 14.02.2022 22:30, Tim Harvey wrote:
> If using modem-control gpios for CTS we must leave IRTS disabled
> as otherwise the hardware will only transmit based on the internal RTS
> pin routed to it.
>
> This allows hardware flow control to be used with cts-gpios.

This hardware flow control sounds quite limited. Once CTS becomes
inactive, the transmitter will still output all characters from TxFIFO.
Transmitting whole TxFIFO already sounds quite bad, but that's the best
case scenario where gpio interrupt is handled right away without any
delay (so more than TxFIFO characters can actually be transmitted).

Does the internal RTS default to inactive when it's not pinmuxed to the
actual pin? If so, then controlling UCR2_IRTS based on CTS gpio could
halt the transmission when the TxFIFO is not empty.

Best Regards,
Tomasz Mon