diff options
Diffstat (limited to 'recipes-kernel/linux/linux-at91-4.9.87/mtcdt/linux-4.9-mtcdt-atmel-multidrop.patch')
-rw-r--r-- | recipes-kernel/linux/linux-at91-4.9.87/mtcdt/linux-4.9-mtcdt-atmel-multidrop.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-at91-4.9.87/mtcdt/linux-4.9-mtcdt-atmel-multidrop.patch b/recipes-kernel/linux/linux-at91-4.9.87/mtcdt/linux-4.9-mtcdt-atmel-multidrop.patch new file mode 100644 index 0000000..188c5cf --- /dev/null +++ b/recipes-kernel/linux/linux-at91-4.9.87/mtcdt/linux-4.9-mtcdt-atmel-multidrop.patch @@ -0,0 +1,48 @@ + This patch was derived from the Vizzini driver and this patch: + + https://www.spinics.net/lists/linux-serial/msg25999.html + + Since all prior versions of MTCDT used the Vizzini driver, + the mapping of 5 bit serial to multidrop (9 bit serial) was + used. + + The purpose of this patch is to reserve the Atmel 5 bit mode + for 9 bit usage on MTCDT MTAC-MFSER. +=========================================================================================== +diff --git orig/drivers/tty/serial/atmel_serial.c new/drivers/tty/serial/atmel_serial.c +index 1297853..cd7987b 100644 +--- orig/drivers/tty/serial/atmel_serial.c ++++ new/drivers/tty/serial/atmel_serial.c +@@ -2073,7 +2073,7 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, + { + struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); + unsigned long flags; +- unsigned int old_mode, mode, imr, quot, baud, div, cd, fp = 0; ++ unsigned int old_mode, mode, mdrop, imr, quot, baud, div, cd, fp = 0; + + /* save the current mode register */ + mode = old_mode = atmel_uart_readl(port, ATMEL_US_MR); +@@ -2084,10 +2084,12 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, + + baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16); + ++ mdrop = 0; + /* byte size */ + switch (termios->c_cflag & CSIZE) { + case CS5: +- mode |= ATMEL_US_CHRL_5; ++ mode |= ATMEL_US_PAR_MULTI_DROP; ++ mdrop = ATMEL_US_SENDA; + break; + case CS6: + mode |= ATMEL_US_CHRL_6; +@@ -2246,7 +2248,8 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, + + atmel_uart_writel(port, ATMEL_US_BRGR, quot); + atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_RSTSTA | ATMEL_US_RSTRX); +- atmel_uart_writel(port, ATMEL_US_CR, ATMEL_US_TXEN | ATMEL_US_RXEN); ++ atmel_uart_writel(port, ATMEL_US_CR, ++ mdrop | ATMEL_US_TXEN | ATMEL_US_RXEN); + atmel_port->tx_stopped = false; + + /* restore interrupts */ |