From: Ed Spiridonov <edo.rus@gmail.com>
To: linux@arm.linux.org.uk
Cc: Ed Spiridonov <edo.rus@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-serial@vger.kernel.org
Subject: [PATCH] serial: pl011: add mark/space parity support
Date: Fri, 4 Mar 2016 08:11:53 +0300 [thread overview]
Message-ID: <1457068313-16092-1-git-send-email-edo.rus@gmail.com> (raw)
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 <edo.rus@gmail.com>
---
drivers/tty/serial/amba-pl011.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index c0da0cc..9de674a 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;
--
2.7.0
reply other threads:[~2016-03-04 5:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1457068313-16092-1-git-send-email-edo.rus@gmail.com \
--to=edo.rus@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).