summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-at91-5.4.243/mtcdt/linux-5.4-reserve-5-bit-serial-for-multidrop.patch
blob: 33f8ecd231bbe85787e350e2b51fa1241fed18e3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 1edc302f56b57512a99d6c21e1ddb85a89d16045 Mon Sep 17 00:00:00 2001
From: Andrii Pientsov <andrii.pientsov@globallogic.com>
Date: Mon, 22 Nov 2021 12:03:15 +0200
Subject: [PATCH] [PATCH] linux-5.4-reserve-5-bit-serial-for-multidrop

---
 drivers/tty/serial/atmel_serial.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index ea0215a0f4a4..28d4a92c0d63 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2158,10 +2158,13 @@ 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;
+		printk(KERN_INFO "termios: Setting Atmel Multi-Drop serial");
 		break;
 	case CS6:
 		mode |= ATMEL_US_CHRL_6;
-- 
2.25.1