summaryrefslogtreecommitdiff
path: root/drivers/serial/serial_stm32x7.h
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2017-06-08 09:26:55 +0200
committerTom Rini <trini@konsulko.com>2017-06-12 08:38:38 -0400
commit1afcf9cb25d4db2c2dd320eb93f463c55cdad040 (patch)
treeb133f174cb34b4cea9a929a31f5a980012de0739 /drivers/serial/serial_stm32x7.h
parent1113ad49dce7d56429c6ad37738d06e7aef21fac (diff)
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 <patrice.chotard@st.com> Reviewed-by: Christophe KERELLO <christophe.kerello@st.com> Reviewed-by: Patrick DELAUNAY <patrick.delaunay@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
Diffstat (limited to 'drivers/serial/serial_stm32x7.h')
-rw-r--r--drivers/serial/serial_stm32x7.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/serial/serial_stm32x7.h b/drivers/serial/serial_stm32x7.h
index 8c025485cd..facfdbabe8 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)