From: Ed Spiridonov Date: Fri, 4 Mar 2016 05:11:53 +0000 (+0300) Subject: serial: pl011: add mark/space parity support X-Git-Tag: v4.6-rc1~118^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb70002cb7430252c6c8e3b19ad66957f253e667;p=karo-tx-linux.git 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) Signed-off-by: Ed Spiridonov Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 3f169275f9fa..7c198e0a3178 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -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;