PPC40x serial_init fix

Markus Schade marks@peppercon.de
Fri Sep 2 15:23:00 GMT 2005


On Fri, 2 Sep 2005, Gary Thomas wrote:

> On Fri, 2005-09-02 at 16:34 +0200, Markus Schade wrote:
>> serial initialization failed to set UART Divisor in DCR register
>> when calculation baud clock.
>> added calculation for PPC405EP
>
> What is this "CFG_BASE_BAUD" all about?  How can you know that
> value is correct for all platforms?  The code I wrote uses the
> actual settings in the CPU to calculate these and should work
> for any platform.  If it does not, let's fix it, but correctly.

That is something I got from the linux kernel or u-boot bootloader.
take arch/ppc/platforms/4xx/cpci405.h or any other.

You just took the value from the CPU without actually setting the UART
divisor. That means, you never really modified the divisor depending 
on CPU speed and desired baud rate, which is necessary (besides setting
the DLM and DLL registers).

Regards,
Markus



More information about the Ecos-patches mailing list