For embedded UARTs compatible with the ns8250 family it is possible
that the driver clock is identical to the processor or bus clock. This is the case for the PowerQUICC processor. When the clock is high enough, overflows happen in the calculation of the time it takes to send 1/10 of a character, used in delay loops. Fix the overflows so as to fix bugs in the delay loops that can cause either insufficient delays or excessive delays.
This commit is contained in:
parent
1c5e367bcc
commit
ebecffe930
@ -81,7 +81,9 @@ ns8250_delay(struct uart_bas *bas)
|
||||
uart_barrier(bas);
|
||||
|
||||
/* 1/10th the time to transmit 1 character (estimate). */
|
||||
return (16000000 * divisor / bas->rclk);
|
||||
if (divisor <= 134)
|
||||
return (16000000 * divisor / bas->rclk);
|
||||
return (16000 * divisor / (bas->rclk / 1000));
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user