Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: 8250_dw: Set port capabilities based on CPR register

The Designware UART has an optional support for 16750
compatible Auto Flow Control. This will enable it based on
the AFCE bit in Component Parameter Register.

Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Heikki Krogerus and committed by
Greg Kroah-Hartman
2920adb6 94b2b47c

+4
+4
drivers/tty/serial/8250/8250_dw.c
··· 221 221 p->flags |= UPF_FIXED_TYPE; 222 222 p->fifosize = DW_UART_CPR_FIFO_SIZE(reg); 223 223 up->tx_loadsz = p->fifosize; 224 + up->capabilities = UART_CAP_FIFO; 224 225 } 226 + 227 + if (reg & DW_UART_CPR_AFCE_MODE) 228 + up->capabilities |= UART_CAP_AFE; 225 229 } 226 230 227 231 static int dw8250_probe(struct platform_device *pdev)