Skip to contentSkip to conversation

serial: pl011: add mark/space parity support

PATCH New Ed Spiridonov 1 participant 1 message Mar 4, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: pl011: add mark/space parity support

PL011 UART has hardware mark/space parity ability, this trivial patch adds support for it. Tested on Raspberry Pi v1, v2 (BCM2835 and BCM2836)

---
 drivers/tty/serial/amba-pl011.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/amba-pl011.c +2 -0
index c0da0cc..9de674a 100644
@@ -1947,6 +1947,8 @@ pl011_set_termios(struct uart_port *port, struct ktermios *termios,
 		lcr_h |= UART01x_LCRH_PEN;
 		if (!(termios->c_cflag & PARODD))
 			lcr_h |= UART01x_LCRH_EPS;
+		if (termios->c_cflag & CMSPAR)
+			lcr_h |= UART011_LCRH_SPS;
 	}
 	if (uap->fifosize > 1)
 		lcr_h |= UART01x_LCRH_FEN;
Signature · 1 line
2.7.0