提交 d3dec96e 编写于 作者: W Wolfram Sang 提交者: Greg Kroah-Hartman

tty: serial: mpc5xxx: add support for mark/space parity

Tested on a custom MPC5200B-board using some fancy industrial protocol.
Verified that MPC512x has identical bits, so should work there as well.
Signed-off-by: NWolfram Sang <w.sang@pengutronix.de>
Acked-by: NAnatolij Gustschin <agust@denx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 bbb63c51
......@@ -775,11 +775,15 @@ mpc52xx_uart_set_termios(struct uart_port *port, struct ktermios *new,
}
if (new->c_cflag & PARENB) {
if (new->c_cflag & CMSPAR)
mr1 |= MPC52xx_PSC_MODE_PARFORCE;
/* With CMSPAR, PARODD also means high parity (same as termios) */
mr1 |= (new->c_cflag & PARODD) ?
MPC52xx_PSC_MODE_PARODD : MPC52xx_PSC_MODE_PAREVEN;
} else
} else {
mr1 |= MPC52xx_PSC_MODE_PARNONE;
}
mr2 = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册