aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-04 15:11:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-04 15:11:57 -0400
commiteca8258be3e60c88383aa439751d3e2069b56241 (patch)
tree44d407781fd4a85423fd55ac15ff2d78bc2b9ae9
parent1cced5015b171415169d938fb179c44fe060dc15 (diff)
parent8e4934c6d6c659e22b1b746af4196683e77ce6ca (diff)
Merge tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH: "Here are 3 serial driver fixes for 4.0-rc6. They fix some reported issues with the samsung and fsl_lpuart drivers. All have been in linux-next for a while" * tag 'tty-4.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: serial: fsl_lpuart: clear receive flag on FIFO flush tty: serial: fsl_lpuart: specify transmit FIFO size serial: samsung: Clear operation mode on UART shutdown
-rw-r--r--drivers/tty/serial/fsl_lpuart.c5
-rw-r--r--drivers/tty/serial/samsung.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index b1893f3f88f1..3ad1458bfeb0 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -921,6 +921,9 @@ static void lpuart_setup_watermark(struct lpuart_port *sport)
921 writeb(val | UARTPFIFO_TXFE | UARTPFIFO_RXFE, 921 writeb(val | UARTPFIFO_TXFE | UARTPFIFO_RXFE,
922 sport->port.membase + UARTPFIFO); 922 sport->port.membase + UARTPFIFO);
923 923
924 /* explicitly clear RDRF */
925 readb(sport->port.membase + UARTSR1);
926
924 /* flush Tx and Rx FIFO */ 927 /* flush Tx and Rx FIFO */
925 writeb(UARTCFIFO_TXFLUSH | UARTCFIFO_RXFLUSH, 928 writeb(UARTCFIFO_TXFLUSH | UARTCFIFO_RXFLUSH,
926 sport->port.membase + UARTCFIFO); 929 sport->port.membase + UARTCFIFO);
@@ -1076,6 +1079,8 @@ static int lpuart_startup(struct uart_port *port)
1076 sport->txfifo_size = 0x1 << (((temp >> UARTPFIFO_TXSIZE_OFF) & 1079 sport->txfifo_size = 0x1 << (((temp >> UARTPFIFO_TXSIZE_OFF) &
1077 UARTPFIFO_FIFOSIZE_MASK) + 1); 1080 UARTPFIFO_FIFOSIZE_MASK) + 1);
1078 1081
1082 sport->port.fifosize = sport->txfifo_size;
1083
1079 sport->rxfifo_size = 0x1 << (((temp >> UARTPFIFO_RXSIZE_OFF) & 1084 sport->rxfifo_size = 0x1 << (((temp >> UARTPFIFO_RXSIZE_OFF) &
1080 UARTPFIFO_FIFOSIZE_MASK) + 1); 1085 UARTPFIFO_FIFOSIZE_MASK) + 1);
1081 1086
diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c
index af821a908720..cf08876922f1 100644
--- a/drivers/tty/serial/samsung.c
+++ b/drivers/tty/serial/samsung.c
@@ -963,6 +963,7 @@ static void s3c24xx_serial_shutdown(struct uart_port *port)
963 free_irq(ourport->tx_irq, ourport); 963 free_irq(ourport->tx_irq, ourport);
964 tx_enabled(port) = 0; 964 tx_enabled(port) = 0;
965 ourport->tx_claimed = 0; 965 ourport->tx_claimed = 0;
966 ourport->tx_mode = 0;
966 } 967 }
967 968
968 if (ourport->rx_claimed) { 969 if (ourport->rx_claimed) {