serial: mxs-auart: fix baud rate range
authorStefan Wahren <stefan.wahren@i2se.com>
Tue, 11 Aug 2015 11:46:01 +0000 (11:46 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 18 Jul 2017 17:38:39 +0000 (18:38 +0100)
commitc1b3678090794d3cd211de97f20fd19e5e29aee5
tree44010f1d0ffd0076817466dec0293bf9432ae758
parent2b3dce5bdbd79f70970ecd882c69ff7c126b1c11
serial: mxs-auart: fix baud rate range

commit df57cf6a879502cd6e5559c1f2d6db12128e074f upstream.

Currently mxs-auart doesn't care correctly about the baud rate divisor.
According to reference manual the baud rate divisor must be between
0x000000EC and 0x003FFFC0. So calculate the possible baud rate range
and use it for uart_get_baud_rate().

Signed-off-by: Stefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/tty/serial/mxs-auart.c