summaryrefslogtreecommitdiff
path: root/lib_arm/board.c
diff options
context:
space:
mode:
authorTsiChung Liew <Tsi-Chung.Liew@freescale.com>2008-05-29 17:21:54 (GMT)
committerJohn Rigby <jrigby@freescale.com>2008-07-11 16:45:56 (GMT)
commit81cc32322acb1b3225ee45606ced48e2a14824dc (patch)
tree27484e115603a42a3f470d0ac471157ff8329e79 /lib_arm/board.c
parent9b55a2536919f4de1bb1044e6eb8262c2f53bc96 (diff)
downloadu-boot-fsl-qoriq-81cc32322acb1b3225ee45606ced48e2a14824dc.tar.xz
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>
Diffstat (limited to 'lib_arm/board.c')
0 files changed, 0 insertions, 0 deletions