Title: [9186] branches/2010R1/drivers/serial/bfin_sport_uart.c: bfin_sport_uart: speed up sport RX sample rate to be 3% faster
- Revision
- 9186
- Author
- sonicz
- Date
- 2010-09-30 04:24:49 -0400 (Thu, 30 Sep 2010)
Log Message
bfin_sport_uart: speed up sport RX sample rate to be 3% faster
The actual uart baud rate of devices vary between +/-2% of what is asked.
The sport rx sample rate should be faster than the double of the worst
case otherwise, wrong data are received. So, set sport RX clock to be
3% faster.
Modified Paths
Diff
Modified: branches/2010R1/drivers/serial/bfin_sport_uart.c (9185 => 9186)
--- branches/2010R1/drivers/serial/bfin_sport_uart.c 2010-09-30 07:54:36 UTC (rev 9185)
+++ branches/2010R1/drivers/serial/bfin_sport_uart.c 2010-09-30 08:24:49 UTC (rev 9186)
@@ -131,7 +131,12 @@
pr_debug("%s RCR1:%x, RCR2:%x\n", __func__, SPORT_GET_RCR1(up), SPORT_GET_RCR2(up));
tclkdiv = sclk / (2 * baud_rate) - 1;
- rclkdiv = sclk / (2 * baud_rate * 2) - 1;
+ /* The actual uart baud rate of devices vary between +/-2%. The sport
+ * RX sample rate should be faster than the double of the worst case,
+ * otherwise, wrong data are received. So, set sport RX clock to be
+ * 3% faster.
+ */
+ rclkdiv = sclk / (2 * baud_rate * 2 * 97 / 100) - 1;
SPORT_PUT_TCLKDIV(up, tclkdiv);
SPORT_PUT_RCLKDIV(up, rclkdiv);
SSYNC();
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits