mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 17:01:14 +00:00
TTY/Serial fixes for 3.17-rc5
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. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlQTNocACgkQMUfUDdst+ylSFQCfcarOgwBv2UaO9rR7IxrBXL5P z5AAnR5wa7Ip5UpfSyqhg67qg42ffq2J =G50/ -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
09db9d6340
3 changed files with 44 additions and 2 deletions
|
@ -540,6 +540,7 @@ static const struct acpi_device_id dw8250_acpi_match[] = {
|
||||||
{ "INT3434", 0 },
|
{ "INT3434", 0 },
|
||||||
{ "INT3435", 0 },
|
{ "INT3435", 0 },
|
||||||
{ "80860F0A", 0 },
|
{ "80860F0A", 0 },
|
||||||
|
{ "8086228A", 0 },
|
||||||
{ },
|
{ },
|
||||||
};
|
};
|
||||||
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
|
MODULE_DEVICE_TABLE(acpi, dw8250_acpi_match);
|
||||||
|
|
|
@ -526,6 +526,45 @@ static void atmel_enable_ms(struct uart_port *port)
|
||||||
UART_PUT_IER(port, ier);
|
UART_PUT_IER(port, ier);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Disable modem status interrupts
|
||||||
|
*/
|
||||||
|
static void atmel_disable_ms(struct uart_port *port)
|
||||||
|
{
|
||||||
|
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
|
||||||
|
uint32_t idr = 0;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interrupt should not be disabled twice
|
||||||
|
*/
|
||||||
|
if (!atmel_port->ms_irq_enabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
atmel_port->ms_irq_enabled = false;
|
||||||
|
|
||||||
|
if (atmel_port->gpio_irq[UART_GPIO_CTS] >= 0)
|
||||||
|
disable_irq(atmel_port->gpio_irq[UART_GPIO_CTS]);
|
||||||
|
else
|
||||||
|
idr |= ATMEL_US_CTSIC;
|
||||||
|
|
||||||
|
if (atmel_port->gpio_irq[UART_GPIO_DSR] >= 0)
|
||||||
|
disable_irq(atmel_port->gpio_irq[UART_GPIO_DSR]);
|
||||||
|
else
|
||||||
|
idr |= ATMEL_US_DSRIC;
|
||||||
|
|
||||||
|
if (atmel_port->gpio_irq[UART_GPIO_RI] >= 0)
|
||||||
|
disable_irq(atmel_port->gpio_irq[UART_GPIO_RI]);
|
||||||
|
else
|
||||||
|
idr |= ATMEL_US_RIIC;
|
||||||
|
|
||||||
|
if (atmel_port->gpio_irq[UART_GPIO_DCD] >= 0)
|
||||||
|
disable_irq(atmel_port->gpio_irq[UART_GPIO_DCD]);
|
||||||
|
else
|
||||||
|
idr |= ATMEL_US_DCDIC;
|
||||||
|
|
||||||
|
UART_PUT_IDR(port, idr);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Control the transmission of a break signal
|
* Control the transmission of a break signal
|
||||||
*/
|
*/
|
||||||
|
@ -1993,7 +2032,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios,
|
||||||
|
|
||||||
/* CTS flow-control and modem-status interrupts */
|
/* CTS flow-control and modem-status interrupts */
|
||||||
if (UART_ENABLE_MS(port, termios->c_cflag))
|
if (UART_ENABLE_MS(port, termios->c_cflag))
|
||||||
port->ops->enable_ms(port);
|
atmel_enable_ms(port);
|
||||||
|
else
|
||||||
|
atmel_disable_ms(port);
|
||||||
|
|
||||||
spin_unlock_irqrestore(&port->lock, flags);
|
spin_unlock_irqrestore(&port->lock, flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -581,7 +581,7 @@ static unsigned int cdns_uart_tx_empty(struct uart_port *port)
|
||||||
{
|
{
|
||||||
unsigned int status;
|
unsigned int status;
|
||||||
|
|
||||||
status = cdns_uart_readl(CDNS_UART_ISR_OFFSET) & CDNS_UART_IXR_TXEMPTY;
|
status = cdns_uart_readl(CDNS_UART_SR_OFFSET) & CDNS_UART_SR_TXEMPTY;
|
||||||
return status ? TIOCSER_TEMT : 0;
|
return status ? TIOCSER_TEMT : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue