Skip to content
Snippets Groups Projects
Commit 81cc3232 authored by TsiChung Liew's avatar TsiChung Liew Committed by John Rigby
Browse files

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: default avatarTsiChung Liew <Tsi-Chung.Liew@freescale.com>
Acked-by: default avatarGerald Van Baren <vanbaren@cideas.com>
parent 9b55a253
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment