diff options
author | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2022-01-11 14:30:05 +0200 |
---|---|---|
committer | Serhii Voloshynov <serhii.voloshynov@globallogic.com> | 2022-01-11 14:30:05 +0200 |
commit | 83b181fb3210fb09a3e4a5c9ef3d3b755fd1b85e (patch) | |
tree | ba53d67863199d7bca67e3448a109497b1980758 /recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch | |
parent | 8d8681be8ea784d03d47668c8182e8efe31f9a33 (diff) | |
download | meta-multitech-atmel-83b181fb3210fb09a3e4a5c9ef3d3b755fd1b85e.tar.gz meta-multitech-atmel-83b181fb3210fb09a3e4a5c9ef3d3b755fd1b85e.tar.bz2 meta-multitech-atmel-83b181fb3210fb09a3e4a5c9ef3d3b755fd1b85e.zip |
Disable CRTSCTS when setting RS485 half duplex to match Vizzini driver - adaptation for 5.4 kernel
Diffstat (limited to 'recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch')
-rw-r--r-- | recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch b/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch new file mode 100644 index 0000000..d17ed37 --- /dev/null +++ b/recipes-kernel/linux/linux-at91-5.4.81/mtcdt/linux-5.4-rs485-atmel-crtscts.patch @@ -0,0 +1,23 @@ +This patch allows RS485 Half Duplex (ATMEL_US_USMODE_RS485 is half duplex) to +work even if handshaking is turned on. This mimics the behavior of the EXAR +USB/Serial driver known as Vizzini. It is impossible to use handshaking when +using ATMEL_US_USMODE_RS485. This provides compatibility between MTCDT-0.1 and +MTCDT-0.2. +======================================================================================= +diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c +index 28d4a92c0d63..2d17558a807d 100644 +--- a/drivers/tty/serial/atmel_serial.c ++++ b/drivers/tty/serial/atmel_serial.c +@@ -2250,6 +2250,9 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, + atmel_uart_writel(port, ATMEL_US_TTGR, + port->rs485.delay_rts_after_send); + mode |= ATMEL_US_USMODE_RS485; ++ /* CRTSCTS is impossible in RS485 mode, and breaks the driver ++ * so we cannot do a send. */ ++ termios->c_cflag &= ~CRTSCTS; + } else if (port->iso7816.flags & SER_ISO7816_ENABLED) { + atmel_uart_writel(port, ATMEL_US_TTGR, port->iso7816.tg); + /* select mck clock, and output */ +-- +2.25.1 + |