]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
OMAP/serial: Support 1Mbaud and similar baudrates that require Mode16 instead of...
authorAlexey Pelykh <alexey.pelykh@gmail.com>
Wed, 16 Jan 2013 10:08:06 +0000 (05:08 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 01:20:09 +0000 (17:20 -0800)
commit5fe2123647c15089c3a905137bea87b16973c896
tree45cca444ffc582deca9cb292d6d26bfb11208b25
parent795b5bbe215c7b988fcf218613d2f3357924f0d2
OMAP/serial: Support 1Mbaud and similar baudrates that require Mode16 instead of Mode13

Original table in OMAP TRM named "UART Mode Baud Rates, Divisor
Values, and Error Rates" determines modes not for all common baud
rates. E.g. for 1000000 baud rate mode should be 16x, but according to
that table it's determined as 13x. According to current implementation
of mode divisor selection, after requesting 1000000 baudrate from
driver, later one will configure chip to use MODE13 divisor. Assuming
48Mhz as common UART clock speed, MODE13 divisor will effectively give
1230769 baudrate, what is quite far from desired 1000000 baudrate.
While with MODE16 divisor, chip will produce exact 1000000 baudrate.
In old driver that served UART devices (8250.c and serial_core.c) this
divisor could have been configured by user-space program, but in
omap_serial.c driver implementation this ability was not implemented
(afaik, by design) thus disallowing proper usage of MODE16-compatible
baudrates.

Signed-off-by: Alexey Pelykh <alexey.pelykh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c