Re: [PATCH] tty: serial: mpc5xxx: add support for mark/space parity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Wolfram,

On Mon, 27 Aug 2012 16:03:14 +0200
Wolfram Sang <w.sang@xxxxxxxxxxxxxx> wrote:

> 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@xxxxxxxxxxxxxx>
> Cc: Anatolij Gustschin <agust@xxxxxxx>
> Cc: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/tty/serial/mpc52xx_uart.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)

Looks good, so

Acked-by: Anatolij Gustschin <agust@xxxxxxx>

> diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
> index bedac0d..f19d04e 100644
> --- a/drivers/tty/serial/mpc52xx_uart.c
> +++ b/drivers/tty/serial/mpc52xx_uart.c
> @@ -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;
>  
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux