Tim Harvey <tharvey@xxxxxxxxxxxxx> writes: [...] > I have found the issue here which causes hardware flow control when > using GPIO's with the imx UART driver to fail. The > imx_uart_set_termios() function clears the UCR2_IRTS whenver hardware > flow control is enabled which configures the transmitter to only send > with the RTS pin is asserted. In the case of a GPIO being used instead > of the dedicated internal RTS pin for the uart, this will keep the > transmitter from ever transmitting. In the hardware flow control case > where a GPIO is used UCR2_IRTS must be set to ignore the RTS pin. We > can use the have_rtsgpio flag which is set when 'rts-gpios' property > is used as a qualifier for this. > > diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c > index df8a0c8b8b29..d506cbd679dd 100644 > --- a/drivers/tty/serial/imx.c > +++ b/drivers/tty/serial/imx.c > @@ -1674,8 +1674,7 @@ imx_uart_set_termios(struct uart_port *port, > struct ktermios *termios, > if (ucr2 & UCR2_CTS) > ucr2 |= UCR2_CTSC; > } > - > - if (termios->c_cflag & CRTSCTS) > + if (!sport->have_rtsgpio && termios->c_cflag & CRTSCTS) > ucr2 &= ~UCR2_IRTS; > if (termios->c_cflag & CSTOPB) > ucr2 |= UCR2_STPB; > > If this makes sense, I'll send a patch. To me it does make sense. Driver should stay away from UCR2_IRTS indeed if software (GPIO) RTS/CTS management is in use. -- Sergey Organov