diff options
author | Alexey Starikovskiy <aystarik@gmail.com> | 2016-09-21 13:44:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-27 13:54:03 +0300 |
commit | 36131cdfef5aef7f4a9a36423a7a338bd6f68ad6 (patch) | |
tree | 7d75168490b71e02d839a8f56446238aead9f083 /include/linux/atmel_serial.h | |
parent | e98d41370392dbc3e94c8802ce4e9eec9efdf92e (diff) | |
download | linux-36131cdfef5aef7f4a9a36423a7a338bd6f68ad6.tar.xz |
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 */ |