[U-Boot-Users] [PATCH] ColdFire: Fix UART baudrate formula

2008-05-29 Thread Tsi-Chung.Liew
From: TsiChung Liew [EMAIL PROTECTED] 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 [EMAIL

Re: [U-Boot-Users] [PATCH] ColdFire: Fix UART baudrate formula

2008-05-29 Thread Kenneth Johansson
On Thu, 2008-05-29 at 15:26 -0500, Tsi-Chung.Liew wrote: From: TsiChung Liew [EMAIL PROTECTED] 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

[U-Boot-Users] [PATCH] ColdFire: Fix UART baudrate formula

2008-05-29 Thread Tsi-Chung.Liew
From: TsiChung Liew [EMAIL PROTECTED] 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 [EMAIL