From: Greg Kroah-Hartman Date: Tue, 20 Mar 2018 10:27:18 +0000 (+0100) Subject: Merge 4.16-rc6 into tty-next X-Git-Tag: v4.17-rc1~125^2~3 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/4958134df54c2c84e9c22ea042761d439164d26e Merge 4.16-rc6 into tty-next We want the serial/tty fixes in here as well. Signed-off-by: Greg Kroah-Hartman --- 4958134df54c2c84e9c22ea042761d439164d26e diff --cc drivers/tty/serial/imx.c index 552fd050f2bb,a33c685af990..91f3a1a5cb7f --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@@ -2262,18 -2093,18 +2262,18 @@@ static int imx_uart_probe(struct platfo uart_get_rs485_mode(&pdev->dev, &sport->port.rs485); if (sport->port.rs485.flags & SER_RS485_ENABLED && - (!sport->have_rtscts || !sport->have_rtsgpio)) + (!sport->have_rtscts && !sport->have_rtsgpio)) dev_err(&pdev->dev, "no RTS control, disabling rs485\n"); - imx_rs485_config(&sport->port, &sport->port.rs485); + imx_uart_rs485_config(&sport->port, &sport->port.rs485); /* Disable interrupts before requesting them */ - reg = readl_relaxed(sport->port.membase + UCR1); - reg &= ~(UCR1_ADEN | UCR1_TRDYEN | UCR1_IDEN | UCR1_RRDYEN | + ucr1 = imx_uart_readl(sport, UCR1); + ucr1 &= ~(UCR1_ADEN | UCR1_TRDYEN | UCR1_IDEN | UCR1_RRDYEN | UCR1_TXMPTYEN | UCR1_RTSDEN); - writel_relaxed(reg, sport->port.membase + UCR1); + imx_uart_writel(sport, ucr1, UCR1); - if (!is_imx1_uart(sport) && sport->dte_mode) { + if (!imx_uart_is_imx1(sport) && sport->dte_mode) { /* * The DCEDTE bit changes the direction of DSR, DCD, DTR and RI * and influences if UCR3_RI and UCR3_DCD changes the level of RI