Commit c2684ed7 authored by Wan Ahmad Zainie's avatar Wan Ahmad Zainie Committed by Greg Kroah-Hartman

serial: 8250_pci: report DCD and DSR signals as active for Bay Trail

Bay Trail UART port does not support DCD and DSR lines. The driver
shall report that these signals are permanently active. This patch
is for HSUART enumerated via PCI.

For ACPI, see commit dfd37668 ("serial: 8250_dw: Fix get_mctrl
behaviour"). The commit also describes the possible issue if these
signals are enabled on a port without these pins.
Signed-off-by: default avatarWan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 144ef5c2
...@@ -1416,6 +1416,17 @@ static bool byt_dma_filter(struct dma_chan *chan, void *param) ...@@ -1416,6 +1416,17 @@ static bool byt_dma_filter(struct dma_chan *chan, void *param)
return true; return true;
} }
static unsigned int
byt_get_mctrl(struct uart_port *port)
{
unsigned int ret = serial8250_do_get_mctrl(port);
/* Force DCD and DSR signals to permanently be reported as active. */
ret |= TIOCM_CAR | TIOCM_DSR;
return ret;
}
static int static int
byt_serial_setup(struct serial_private *priv, byt_serial_setup(struct serial_private *priv,
const struct pciserial_board *board, const struct pciserial_board *board,
...@@ -1480,6 +1491,7 @@ byt_serial_setup(struct serial_private *priv, ...@@ -1480,6 +1491,7 @@ byt_serial_setup(struct serial_private *priv,
port->port.type = PORT_16550A; port->port.type = PORT_16550A;
port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE); port->port.flags = (port->port.flags | UPF_FIXED_PORT | UPF_FIXED_TYPE);
port->port.set_termios = byt_set_termios; port->port.set_termios = byt_set_termios;
port->port.get_mctrl = byt_get_mctrl;
port->port.fifosize = 64; port->port.fifosize = 64;
port->tx_loadsz = 64; port->tx_loadsz = 64;
port->dma = dma; port->dma = dma;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment