aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-09-12 14:59:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-09-12 14:59:48 -0400
commit09db9d63405e47db5ab60a7ec0bc2f5d58decc9b (patch)
tree3c639eccee7208cc64137370351c21e31b0d71de
parent90a3c48fbfbfc2451f1edc145acef8b9892ad1e6 (diff)
parent6731af573ac28de2297002992f38caa760e3dadf (diff)
Merge tag 'tty-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH: "Here are 3 patches for 3.17-rc5. Two serial driver fixes that resolve some reported issues, and one new device id. All have been in linux-next just fine" * tag 'tty-3.17-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: tty: xuartps: Fix tx_emtpy() callback tty/serial: at91: BUG: disable interrupts when !UART_ENABLE_MS() serial: 8250_dw: Add ACPI ID for Intel Braswell
-rw-r--r--drivers/tty/serial/8250/8250_dw.c1
-rw-r--r--drivers/tty/serial/atmel_serial.c43
-rw-r--r--drivers/tty/serial/xilinx_uartps.c2
3 files changed, 44 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 4db7987ec225..57d9df84ce5d 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -540,6 +540,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = {
540 { "INT3434", 0 }, 540 { "INT3434", 0 },
541 { "INT3435", 0 }, 541 { "INT3435", 0 },
542 { "80860F0A", 0 }, 542 { "80860F0A", 0 },
543 { "8086228A", 0 },
543 { }, 544 { },
544}; 545};
545MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match); 546MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 7b63677475c1..d7d4584549a5 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -527,6 +527,45 @@ static void atmel_enable_ms(struct uart_port *port)
527} 527}
528 528
529/* 529/*
530 * Disable modem status interrupts
531 */
532static void atmel_disable_ms(struct uart_port *port)
533{
534 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
535 uint32_t idr = 0;
536
537 /*
538 * Interrupt should not be disabled twice
539 */
540 if (!atmel_port->ms_irq_enabled)
541 return;
542
543 atmel_port->ms_irq_enabled = false;
544
545 if (atmel_port->gpio_irq[UART_GPIO_CTS] >= 0)
546 disable_irq(atmel_port->gpio_irq[UART_GPIO_CTS]);
547 else
548 idr |= ATMEL_US_CTSIC;
549
550 if (atmel_port->gpio_irq[UART_GPIO_DSR] >= 0)
551 disable_irq(atmel_port->gpio_irq[UART_GPIO_DSR]);
552 else
553 idr |= ATMEL_US_DSRIC;
554
555 if (atmel_port->gpio_irq[UART_GPIO_RI] >= 0)
556 disable_irq(atmel_port->gpio_irq[UART_GPIO_RI]);
557 else
558 idr |= ATMEL_US_RIIC;
559
560 if (atmel_port->gpio_irq[UART_GPIO_DCD] >= 0)
561 disable_irq(atmel_port->gpio_irq[UART_GPIO_DCD]);
562 else
563 idr |= ATMEL_US_DCDIC;
564
565 UART_PUT_IDR(port, idr);
566}
567
568/*
530 * Control the transmission of a break signal 569 * Control the transmission of a break signal
531 */ 570 */
532static void atmel_break_ctl(struct uart_port *port, int break_state) 571static void atmel_break_ctl(struct uart_port *port, int break_state)
@@ -1993,7 +2032,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
1993 2032
1994 /* CTS flow-control and modem-status interrupts */ 2033 /* CTS flow-control and modem-status interrupts */
1995 if (UART_ENABLE_MS(port, termios->c_cflag)) 2034 if (UART_ENABLE_MS(port, termios->c_cflag))
1996 port->ops->enable_ms(port); 2035 atmel_enable_ms(port);
2036 else
2037 atmel_disable_ms(port);
1997 2038
1998 spin_unlock_irqrestore(&port->lock, flags); 2039 spin_unlock_irqrestore(&port->lock, flags);
1999} 2040}
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index 01951d27cc03..806e4bcadbd7 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c
@@ -581,7 +581,7 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port)
581{ 581{
582 unsigned int status; 582 unsigned int status;
583 583
584 status = cdns_uart_readl(CDNS_UART_ISR_OFFSET) & CDNS_UART_IXR_TXEMPTY; 584 status = cdns_uart_readl(CDNS_UART_SR_OFFSET) & CDNS_UART_SR_TXEMPTY;
585 return status ? TIOCSER_TEMT : 0; 585 return status ? TIOCSER_TEMT : 0;
586} 586}
587 587