diff options
author | Alexey Starikovskiy <aystarik@gmail.com> | 2016-09-21 12:44:14 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-27 12:54:03 +0200 |
commit | 36131cdfef5aef7f4a9a36423a7a338bd6f68ad6 (patch) | |
tree | 7d75168490b71e02d839a8f56446238aead9f083 /include/linux/atmel_serial.h | |
parent | e98d41370392dbc3e94c8802ce4e9eec9efdf92e (diff) | |
download | linux-stable-36131cdfef5aef7f4a9a36423a7a338bd6f68ad6.tar.gz linux-stable-36131cdfef5aef7f4a9a36423a7a338bd6f68ad6.tar.bz2 linux-stable-36131cdfef5aef7f4a9a36423a7a338bd6f68ad6.zip |
tty/serial: atmel: fix fractional baud rate computation
The problem with previous code was it rounded values in wrong
place and produced wrong baud rate in some cases.
Signed-off-by: Alexey Starikovskiy <aystarik@gmail.com>
[nicolas.ferre@atmel.com: port to newer kernel and add commit log]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/atmel_serial.h')
-rw-r--r-- | include/linux/atmel_serial.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/atmel_serial.h b/include/linux/atmel_serial.h index f8e452aa48d7..bd2560502f3c 100644 --- a/include/linux/atmel_serial.h +++ b/include/linux/atmel_serial.h @@ -119,6 +119,7 @@ #define ATMEL_US_BRGR 0x20 /* Baud Rate Generator Register */ #define ATMEL_US_CD GENMASK(15, 0) /* Clock Divider */ #define ATMEL_US_FP_OFFSET 16 /* Fractional Part */ +#define ATMEL_US_FP_MASK 0x7 #define ATMEL_US_RTOR 0x24 /* Receiver Time-out Register for USART */ #define ATMEL_UA_RTOR 0x28 /* Receiver Time-out Register for UART */ |