|
@@ -377,9 +377,9 @@ static void imx_stop_tx(struct uart_port *port)
|
|
readl(port->membase + USR2) & USR2_TXDC) {
|
|
readl(port->membase + USR2) & USR2_TXDC) {
|
|
temp = readl(port->membase + UCR2);
|
|
temp = readl(port->membase + UCR2);
|
|
if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
|
|
if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
|
|
- imx_port_rts_inactive(sport, &temp);
|
|
|
|
- else
|
|
|
|
imx_port_rts_active(sport, &temp);
|
|
imx_port_rts_active(sport, &temp);
|
|
|
|
+ else
|
|
|
|
+ imx_port_rts_inactive(sport, &temp);
|
|
temp |= UCR2_RXEN;
|
|
temp |= UCR2_RXEN;
|
|
writel(temp, port->membase + UCR2);
|
|
writel(temp, port->membase + UCR2);
|
|
|
|
|
|
@@ -585,9 +585,9 @@ static void imx_start_tx(struct uart_port *port)
|
|
if (port->rs485.flags & SER_RS485_ENABLED) {
|
|
if (port->rs485.flags & SER_RS485_ENABLED) {
|
|
temp = readl(port->membase + UCR2);
|
|
temp = readl(port->membase + UCR2);
|
|
if (port->rs485.flags & SER_RS485_RTS_ON_SEND)
|
|
if (port->rs485.flags & SER_RS485_RTS_ON_SEND)
|
|
- imx_port_rts_inactive(sport, &temp);
|
|
|
|
- else
|
|
|
|
imx_port_rts_active(sport, &temp);
|
|
imx_port_rts_active(sport, &temp);
|
|
|
|
+ else
|
|
|
|
+ imx_port_rts_inactive(sport, &temp);
|
|
if (!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
|
if (!(port->rs485.flags & SER_RS485_RX_DURING_TX))
|
|
temp &= ~UCR2_RXEN;
|
|
temp &= ~UCR2_RXEN;
|
|
writel(temp, port->membase + UCR2);
|
|
writel(temp, port->membase + UCR2);
|
|
@@ -1477,9 +1477,9 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
|
|
*/
|
|
*/
|
|
if (port->rs485.flags &
|
|
if (port->rs485.flags &
|
|
SER_RS485_RTS_AFTER_SEND)
|
|
SER_RS485_RTS_AFTER_SEND)
|
|
- imx_port_rts_inactive(sport, &ucr2);
|
|
|
|
- else
|
|
|
|
imx_port_rts_active(sport, &ucr2);
|
|
imx_port_rts_active(sport, &ucr2);
|
|
|
|
+ else
|
|
|
|
+ imx_port_rts_inactive(sport, &ucr2);
|
|
} else {
|
|
} else {
|
|
imx_port_rts_auto(sport, &ucr2);
|
|
imx_port_rts_auto(sport, &ucr2);
|
|
}
|
|
}
|
|
@@ -1489,9 +1489,9 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
|
|
} else if (port->rs485.flags & SER_RS485_ENABLED) {
|
|
} else if (port->rs485.flags & SER_RS485_ENABLED) {
|
|
/* disable transmitter */
|
|
/* disable transmitter */
|
|
if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
|
|
if (port->rs485.flags & SER_RS485_RTS_AFTER_SEND)
|
|
- imx_port_rts_inactive(sport, &ucr2);
|
|
|
|
- else
|
|
|
|
imx_port_rts_active(sport, &ucr2);
|
|
imx_port_rts_active(sport, &ucr2);
|
|
|
|
+ else
|
|
|
|
+ imx_port_rts_inactive(sport, &ucr2);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1733,9 +1733,9 @@ static int imx_rs485_config(struct uart_port *port,
|
|
/* disable transmitter */
|
|
/* disable transmitter */
|
|
temp = readl(sport->port.membase + UCR2);
|
|
temp = readl(sport->port.membase + UCR2);
|
|
if (rs485conf->flags & SER_RS485_RTS_AFTER_SEND)
|
|
if (rs485conf->flags & SER_RS485_RTS_AFTER_SEND)
|
|
- imx_port_rts_inactive(sport, &temp);
|
|
|
|
- else
|
|
|
|
imx_port_rts_active(sport, &temp);
|
|
imx_port_rts_active(sport, &temp);
|
|
|
|
+ else
|
|
|
|
+ imx_port_rts_inactive(sport, &temp);
|
|
writel(temp, sport->port.membase + UCR2);
|
|
writel(temp, sport->port.membase + UCR2);
|
|
}
|
|
}
|
|
|
|
|