[U-Boot-Users] [Patch] MPC5200 PSC Baud rate calculation

Hello,
attached is a patch against 1.0.2 (checked out 2004-01-14) that fixes a bug in MPC5200 PSC Baud rate calculation. The patch modifies cpu/mpc5xxx/serial.c.
The problem was that not the proper rounding was applied which resulted in slightly off Baud rates. The formula to calculate the Baud rate is:
Divider = (f_IPBI / 32) / Baudrate
Hence, the formula using integer should be:
Divider = (((f_IPBI + 16) / 32) + Baudrate/2) / Baudrate
Regards Mark Jonas

In message DF02D66C37C26B4C8018BF84F0E37FEC3EBB27@zwg18exm01.sps.mot.com you wrote:
attached is a patch against 1.0.2 (checked out 2004-01-14) that fixes a bug in MPC5200 PSC Baud rate calculation. The patch modifies cpu/mpc5xxx/serial.c.
The problem was that not the proper rounding was applied which resulted in slightly off Baud rates. The formula to calculate the
Added & checked in. Thanks.
Best regards,
Wolfgang Denk
participants (2)
-
Jonas Mark-r50740
-
Wolfgang Denk