[Patch v.2] mpc5200b/uart: improve baud rate calculation (reach high baud rates, better accuracy)

Grant Likely grant.likely at secretlab.ca
Fri Mar 5 00:27:53 EST 2010


On Thu, Mar 4, 2010 at 2:56 AM, Albrecht Dreß <albrecht.dress at arcor.de> wrote:
>> That way each set_divisor() can do whatever makes the most sense for
>> the divisors available to it.  The 5121 for example has both a /10 and
>> a /32 divisor, plus it can use an external clock.
>
> Ouch.  I don't have a 512x, but isn't the current code plain wrong then?  It uses mpc5xxx_get_bus_frequency() as input for the baud rate calculation, and if the serial code assumes /16 instead of /10, the result must be terribly off.  Or did I miss something here?

If you are, then I'm missing the same thing.  Do you best to keep the
5121 calculation work out to the same value it uses now.  We'll ask
someone with a 5121 to test it out before I add the patch to my -next
branch.

g.


More information about the Linuxppc-dev mailing list