OSDN Git Service

USB: serial: f81534: add high baud rate support
authorJi-Ze Hong (Peter Hong) <hpeter@gmail.com>
Thu, 11 Jan 2018 06:47:15 +0000 (14:47 +0800)
committerJohan Hovold <johan@kernel.org>
Thu, 11 Jan 2018 09:56:24 +0000 (10:56 +0100)
commit3aacac02f38543f7a0936fa1e844cd9564b04aaf
tree8013b52f52be741fff8347c7e3f14eb5e7a42710
parente255f2078b1206e51f1abd0623902429db35fb5f
USB: serial: f81534: add high baud rate support

The F81532/534 had 4 clocksource 1.846/18.46/14.77/24MHz and baud rates
can be up to 1.5Mbits with 24MHz.

This device may generate data overrun when baud rate setting to 921600bps
or higher with old UART trigger level setting (8x14=112) with full
loading. We'll change trigger level from 8x14=112 to 8x8=64 to avoid data
overrun.

Also the read/write of EP0 will be affected by this patch. The worst case
of responding time is 20s when all serial port are full loading and trying
to access EP0, so we change EP0 timeout from 10 to 20s.

F81532/534 Clock register (offset +08h)

Bit0: UART Enable (always on)
Bit2-1: Clock source selector
00: 1.846MHz.
01: 18.46MHz.
10: 24MHz.
11: 14.77MHz.

Signed-off-by: Ji-Ze Hong (Peter Hong) <hpeter+linux_kernel@gmail.com>
[ johan: only use GENMASK() for masks ]
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/f81534.c