lkml.org 
[lkml]   [2012]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tty/8250_early: Prevent rounding error in uartclk to baud ratio
On Fri, 28 Sep 2012 16:19:08 +0400
Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote:

> 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).
>
> On the same lines as following:
> http://www.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.9-rc3/2.6.9-rc3-mm2/broken-out/serial-pick-nearest-baud-rate-divider.patch
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>

Seems sensible to me.

Acked-by: Alan Cox <alan@linux.intel.com>


\
 
 \ /
  Last update: 2012-09-28 17:01    [W:0.046 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site