From 8b152f1096975d012f60387b899d407e4a93b46c Mon Sep 17 00:00:00 2001 From: Alexander Shiyan Date: Tue, 3 Jun 2014 18:54:44 +0400 Subject: serial: treewide: Remove empty implementations of enable_ms() Signed-off-by: Alexander Shiyan Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/bfin_uart.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'drivers/tty/serial/bfin_uart.c') diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index ac86a20992e9..dddc081568f1 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c @@ -200,14 +200,6 @@ static void bfin_serial_stop_rx(struct uart_port *port) UART_CLEAR_IER(uart, ERBFI); } -/* - * Set the modem control timer to fire immediately. - */ -static void bfin_serial_enable_ms(struct uart_port *port) -{ -} - - #if ANOMALY_05000363 && defined(CONFIG_SERIAL_BFIN_PIO) # define UART_GET_ANOMALY_THRESHOLD(uart) ((uart)->anomaly_threshold) # define UART_SET_ANOMALY_THRESHOLD(uart, v) ((uart)->anomaly_threshold = (v)) @@ -1014,7 +1006,6 @@ static struct uart_ops bfin_serial_pops = { .stop_tx = bfin_serial_stop_tx, .start_tx = bfin_serial_start_tx, .stop_rx = bfin_serial_stop_rx, - .enable_ms = bfin_serial_enable_ms, .break_ctl = bfin_serial_break_ctl, .startup = bfin_serial_startup, .shutdown = bfin_serial_shutdown, -- cgit v1.2.3 From 8bd67d7d2cbcea2a2371480fe3fe47f2bcd0294c Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Mon, 16 Jun 2014 09:17:10 -0400 Subject: serial: blackfin: Fix CTS flow control blackfin uart port drivers mistakenly set the struct uart_port flags bit UPF_BUG_THRE (which only has meaning to the 8250 core) while trying to set ASYNC_CTS_FLOW. Uart port drivers can override termios settings based on actual hardware support in their .set_termios method; the serial core sets the appropriate port flags based on the overrides. Overriding only the initial termios settings is accomplished by only perform those overrides if the old termios parameter is NULL. CC: Sonic Zhang CC: adi-buildroot-devel@lists.sourceforge.net Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/bfin_sport_uart.c | 11 ++++++++--- drivers/tty/serial/bfin_uart.c | 13 ++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'drivers/tty/serial/bfin_uart.c') diff --git a/drivers/tty/serial/bfin_sport_uart.c b/drivers/tty/serial/bfin_sport_uart.c index 1174efa466a6..7810aa290edf 100644 --- a/drivers/tty/serial/bfin_sport_uart.c +++ b/drivers/tty/serial/bfin_sport_uart.c @@ -495,6 +495,13 @@ static void sport_set_termios(struct uart_port *port, pr_debug("%s enter, c_cflag:%08x\n", __func__, termios->c_cflag); +#ifdef CONFIG_SERIAL_BFIN_SPORT_CTSRTS + if (old == NULL && up->cts_pin != -1) + termios->c_cflag |= CRTSCTS; + else if (up->cts_pin == -1) + termios->c_cflag &= ~CRTSCTS; +#endif + switch (termios->c_cflag & CSIZE) { case CS8: up->csize = 8; @@ -807,10 +814,8 @@ static int sport_uart_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (res == NULL) sport->cts_pin = -1; - else { + else sport->cts_pin = res->start; - sport->port.flags |= ASYNC_CTS_FLOW; - } res = platform_get_resource(pdev, IORESOURCE_IO, 1); if (res == NULL) diff --git a/drivers/tty/serial/bfin_uart.c b/drivers/tty/serial/bfin_uart.c index dddc081568f1..dec0fd725d80 100644 --- a/drivers/tty/serial/bfin_uart.c +++ b/drivers/tty/serial/bfin_uart.c @@ -785,6 +785,13 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, unsigned int ier, lcr = 0; unsigned long timeout; +#ifdef CONFIG_SERIAL_BFIN_CTSRTS + if (old == NULL && uart->cts_pin != -1) + termios->c_cflag |= CRTSCTS; + else if (uart->cts_pin == -1) + termios->c_cflag &= ~CRTSCTS; +#endif + switch (termios->c_cflag & CSIZE) { case CS8: lcr = WLS(8); @@ -1316,12 +1323,8 @@ static int bfin_serial_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_IO, 0); if (res == NULL) uart->cts_pin = -1; - else { + else uart->cts_pin = res->start; -#ifdef CONFIG_SERIAL_BFIN_CTSRTS - uart->port.flags |= ASYNC_CTS_FLOW; -#endif - } res = platform_get_resource(pdev, IORESOURCE_IO, 1); if (res == NULL) -- cgit v1.2.3