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

serial: uartps: Add support for cts-override

Having flow is configurable. Add support for the same by
checking for cts-override.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Shubhrajyoti Datta and committed by
Greg Kroah-Hartman
1863178b b1072b4f

+12
+12
drivers/tty/serial/xilinx_uartps.c
··· 193 193 int id; 194 194 struct notifier_block clk_rate_change_nb; 195 195 u32 quirks; 196 + bool cts_override; 196 197 }; 197 198 struct cdns_platform_data { 198 199 u32 quirks; ··· 1001 1000 */ 1002 1001 static unsigned int cdns_uart_get_mctrl(struct uart_port *port) 1003 1002 { 1003 + struct cdns_uart *cdns_uart_data = port->private_data; 1004 + 1005 + if (cdns_uart_data->cts_override) 1006 + return 0; 1007 + 1004 1008 return TIOCM_CTS | TIOCM_DSR | TIOCM_CAR; 1005 1009 } 1006 1010 ··· 1013 1007 { 1014 1008 u32 val; 1015 1009 u32 mode_reg; 1010 + struct cdns_uart *cdns_uart_data = port->private_data; 1011 + 1012 + if (cdns_uart_data->cts_override) 1013 + return; 1016 1014 1017 1015 val = readl(port->membase + CDNS_UART_MODEMCR); 1018 1016 mode_reg = readl(port->membase + CDNS_UART_MR); ··· 1675 1665 console_port = NULL; 1676 1666 #endif 1677 1667 1668 + cdns_uart_data->cts_override = of_property_read_bool(pdev->dev.of_node, 1669 + "cts-override"); 1678 1670 return 0; 1679 1671 1680 1672 err_out_pm_disable: