mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-03 11:13:56 +08:00
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: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bbb63c514a
commit
d3dec96e40
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user