AW: MPC5200,PSC in uart mode, receiving problem

Frank Bodammer frank.bodammer at hs.gcd-erlangen.de
Fri Feb 3 05:22:47 EST 2006


Achim Machura wrote:
> Here the patch
>  
> 
>>Even better, post a patch here on the list so we all can benefit.

I experienced similar problems with the serial ports on mpc5200 PSCs
and so i was happy to find your patch, which solved some problem, but
not all. The overrun flag still wasn´t reset after an input overrun
error, so this error was reported persistent for each received character.
I fixed this by adding an command to reset the psc error flags in
receive_char() where the overrun flag is checked. Maybe this isn't
the best solution, but it seems to work.

To reset the overrun error flag, i tried the following statement:

	out_8(&psc->command, MPC5xxx_PSC_RST_ERR_STAT);

but i got unpredictable behaviour in some cases ending in a reset.
Doing the same this way:

	psc->command = MPC5xxx_PSC_RST_ERR_STAT;

always worked as expected. Does someone know what may be wrong with
'out_8' on mpc5200 with kernel 2.4.25 or is that a configuration problem.

By the way, i improved some other parts of the code, especially the
/proc output and the portconfig stuff, so i also attach a patch here,
even not all of it may be useful.

Frank
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_linuxppc_2_4_psc-060202.diff
Url: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060202/69ceddfa/attachment.txt 


More information about the Linuxppc-embedded mailing list