From 1afcf9cb25d4db2c2dd320eb93f463c55cdad040 Mon Sep 17 00:00:00 2001 From: Patrice Chotard Date: Thu, 8 Jun 2017 09:26:55 +0200 Subject: serial: stm32x7: simplify baud rate register calculation Simplify baud rate register formula and use the oversampling uart feature. This code is aligned with what is implemented in kernel driver drivers/tty/serial/stm32-usart.c since kernel v4.9. Signed-off-by: Patrice Chotard Reviewed-by: Christophe KERELLO Reviewed-by: Patrick DELAUNAY Acked-by: Vikas MANOCHA --- drivers/serial/serial_stm32x7.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/serial/serial_stm32x7.h') diff --git a/drivers/serial/serial_stm32x7.h b/drivers/serial/serial_stm32x7.h index 8c025485cd9..facfdbabe89 100644 --- a/drivers/serial/serial_stm32x7.h +++ b/drivers/serial/serial_stm32x7.h @@ -23,8 +23,9 @@ struct stm32_usart { }; -#define USART_CR1_RE (1 << 2) +#define USART_CR1_OVER8 (1 << 15) #define USART_CR1_TE (1 << 3) +#define USART_CR1_RE (1 << 2) #define USART_CR1_UE (1 << 0) #define USART_CR3_OVRDIS (1 << 12) -- cgit v1.2.3