commit | d6a4da06d0bf73ec1908b58ddc09a7e4e0ff3be0 | [log] [tgz] |
---|---|---|
author | TsiChung Liew <Tsi-Chung.Liew@freescale.com> | Thu May 29 12:21:54 2008 -0500 |
committer | John Rigby <jrigby@freescale.com> | Fri Jul 11 10:45:56 2008 -0600 |
tree | 27484e115603a42a3f470d0ac471157ff8329e79 | |
parent | 12cec0a72bb0de6f98c7b5b061a5fb5ec76268ea [diff] |
ColdFire: Fix UART baudrate formula The formula "counter = (u32) (gd->bus_clk / gd->baudrate) / 32" can generate the wrong divisor due to integer division truncation. Round the calculated divisor value by adding 1/2 the baudrate before dividing by the baudrate. Signed-off-by: TsiChung Liew <Tsi-Chung.Liew@freescale.com> Acked-by: Gerald Van Baren <vanbaren@cideas.com>