tty: serial: fsl_lpuart: minimum baud rate support
authorVabhav Sharma <vabhav.sharma@nxp.com>
Fri, 26 Jun 2020 11:20:34 +0000 (16:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 27 Jun 2020 11:52:29 +0000 (13:52 +0200)
commitd10ee1d1917b082f0008a840cde5aeaad11b396b
tree17d681806b178685f5da84c416252a2bdf1932f3
parent3550f8979a7bb2f28940aa26aab77314ec8840bd
tty: serial: fsl_lpuart: minimum baud rate support

The formula for the baud rate is
baud rate = "baud clock / ((OSR+1) × SBR)

Algorithm used in function lpuart32_serial_setbrg() only changes
the SBR. Even with maxmum value put in, OSR stays at 0x7 and the
lowest baud rate would be ~ 2600 bps

Update the algorithm to allow driver operation at 1200,2400 or 600 bps

Signed-off-by: Vabhav Sharma <vabhav.sharma@nxp.com>
Link: https://lore.kernel.org/r/1593170434-13524-1-git-send-email-vabhav.sharma@oss.nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/fsl_lpuart.c