linux/drivers/tty
Alexey Brodkin b15d5380e4 serial/8250/8250_early: Prevent rounding error in uartclk
Modify divisor to select the nearest baud rate divider rather than the
lowest. It minimizes baud rate errors especially on low UART clock
frequencies.

For example, if uartclk is 33000000 and baud is 115200 the ratio is
about 17.9 The current code selects 17 (5% error) but should select 18
(0.5% error).

This 5% error in baud rate leads to garbage on receiving end, while 0.5%
doesn't.

The issue showed up when using the stock 8250 driver for
Synopsys DW UART. This was on a FPGA with ~12MHz UART clock.
When we enabled early serial, we saw garbage which was narrowed down
to the rounding error.

So the bug had been latent and it only showed up with such low clock rates.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 11:29:30 -07:00
..
hvc Feature: 2012-10-12 22:20:28 +09:00
ipwireless Merge branch 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq 2012-10-02 09:54:49 -07:00
serial serial/8250/8250_early: Prevent rounding error in uartclk 2012-10-24 11:29:30 -07:00
vt TTY: vt, fix paste_selection ldisc handling 2012-10-22 16:50:53 -07:00
amiserial.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
bfin_jtag_comm.c TTY: use tty_port_link_device 2012-08-13 16:50:19 -07:00
cyclades.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
ehv_bytechan.c TTY: use tty_port_register_device 2012-08-13 16:50:19 -07:00
isicom.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
Kconfig tty/serial: put (EXPERIMENTAL) marking back on N_GSM and SERIAL_IFX6X60 2012-09-18 17:17:56 +01:00
Makefile
moxa.c TTY: tty_alloc_driver() returns error pointers 2012-08-16 12:07:23 -07:00
moxa.h
mxser.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
mxser.h
n_gsm.c tty: n_gsm: Fix incorrect debug display 2012-09-17 04:45:30 -07:00
n_hdlc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
n_r3964.c tty: localise the lock 2012-08-10 12:55:47 -07:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c TTY: move tty buffers to tty_port 2012-10-22 16:58:28 -07:00
nozomi.c TTY: use tty_port_register_device 2012-08-13 16:50:19 -07:00
pty.c TTY: move tty buffers to tty_port 2012-10-22 16:58:28 -07:00
rocket.c TTY: use tty_port_register_device 2012-08-13 16:50:19 -07:00
rocket.h
rocket_int.h
synclink.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
synclink_gt.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
synclinkmp.c serial: add a new helper function 2012-09-05 13:28:35 -07:00
sysrq.c sparc64: Add global PMU register dumping via sysrq. 2012-10-16 09:34:01 -07:00
tty_audit.c TTY: audit, stop accessing tty->icount 2012-10-22 16:50:54 -07:00
tty_buffer.c TTY: Report warning when low_latency flag is wrongly used 2012-10-24 11:21:32 -07:00
tty_io.c TTY: move tty buffers to tty_port 2012-10-22 16:58:28 -07:00
tty_ioctl.c tty: Fix up PPC fallout from the termios move 2012-07-17 09:10:55 -07:00
tty_ldisc.c TTY: move tty buffers to tty_port 2012-10-22 16:58:28 -07:00
tty_mutex.c tty: localise the lock 2012-08-10 12:55:47 -07:00
tty_port.c TTY: move tty buffers to tty_port 2012-10-22 16:58:28 -07:00