Commit ebc3c2a4 authored by Ilpo Järvinen's avatar Ilpo Järvinen Committed by Greg Kroah-Hartman

serial: 8250: lpc18xx: Remove serial_rs485 sanitization

Serial core handles serial_rs485 sanitization and copying rs485 struct.
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220606100433.13793-28-ilpo.jarvinen@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf426544
...@@ -40,14 +40,6 @@ static int lpc18xx_rs485_config(struct uart_port *port, ...@@ -40,14 +40,6 @@ static int lpc18xx_rs485_config(struct uart_port *port,
u32 rs485_dly_reg = 0; u32 rs485_dly_reg = 0;
unsigned baud_clk; unsigned baud_clk;
if (rs485->flags & SER_RS485_ENABLED)
memset(rs485->padding, 0, sizeof(rs485->padding));
else
memset(rs485, 0, sizeof(*rs485));
rs485->flags &= SER_RS485_ENABLED | SER_RS485_RTS_ON_SEND |
SER_RS485_RTS_AFTER_SEND;
if (rs485->flags & SER_RS485_ENABLED) { if (rs485->flags & SER_RS485_ENABLED) {
rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_NMMEN | rs485_ctrl_reg |= LPC18XX_UART_RS485CTRL_NMMEN |
LPC18XX_UART_RS485CTRL_DCTRL; LPC18XX_UART_RS485CTRL_DCTRL;
...@@ -73,14 +65,9 @@ static int lpc18xx_rs485_config(struct uart_port *port, ...@@ -73,14 +65,9 @@ static int lpc18xx_rs485_config(struct uart_port *port,
/ baud_clk; / baud_clk;
} }
/* Delay RTS before send not supported */
rs485->delay_rts_before_send = 0;
serial_out(up, LPC18XX_UART_RS485CTRL, rs485_ctrl_reg); serial_out(up, LPC18XX_UART_RS485CTRL, rs485_ctrl_reg);
serial_out(up, LPC18XX_UART_RS485DLY, rs485_dly_reg); serial_out(up, LPC18XX_UART_RS485DLY, rs485_dly_reg);
port->rs485 = *rs485;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment