serial: stm32x7: simplify baud rate register calculation
authorPatrice Chotard <patrice.chotard@st.com>
Thu, 8 Jun 2017 07:26:55 +0000 (09:26 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 12 Jun 2017 12:38:38 +0000 (08:38 -0400)
commit1afcf9cb25d4db2c2dd320eb93f463c55cdad040
treeb133f174cb34b4cea9a929a31f5a980012de0739
parent1113ad49dce7d56429c6ad37738d06e7aef21fac
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>
drivers/serial/serial_stm32x7.c
drivers/serial/serial_stm32x7.h