[PATCH V2] workaround for mpc52xx erratum #364 (serial may not be reset in break state)
René Bürgel
r.buergel at unicontrol.de
Wed Nov 5 01:13:55 EST 2008
Wolfram Sang schrieb:
> Hello Rene,
>
> I haven't actually applied the patch, just a few comments from a
> glimpse:
>
> Major nit: Please add to the comment that this bug is still present on
> the MPC5200B, although it is not in its errata sheet. Thils will avoid
> later confusion. (Out of interest, did you contact Freescale about this
> bug?)
>
Comment added, contacting Freescale is still on my to-do-list :)
>
>> + *
>> + * The workaround resets the baudrate to 4800, waits for a stable state and resets break state repeatedly if necessary.
>> + * Optionally it can release the lock while waiting.
>> + * 1 character at 4800 baud takes 2ms, 3ms should be enough for 1 character at higher speed and 1 char at lowest
>> + * works only with longer delays
>>
>
> Did I get it right that there are cases where the workaround won't work?
>
Yes, currently it doesn't work when receiving with less than 4800 baud.
I'll try to fix this.
>
>> +{
>> + struct mpc52xx_psc __iomem *psc = PSC(port);
>> +#ifdef CONFIG_PPC_MPC52xx
>> + out_8(&psc->ctur,0x01);
>> + out_8(&psc->ctlr,0xae);
>>
>
> Those are magic values. If you can't build them using defined
> constants, at least document them, please.
>
The magic numbers will hopefully vanish after generalizing the patch to
work with every baudrate.
> Thanks!
>
> Wolfram Sang
>
>
Thanks for your suggestions
--
René Bürgel
Software Engineer
Unicontrol Systemtechnik GmbH
OT Dittersbach
Sachsenburger Weg 34
09669 Frankenberg
Tel.: 03 72 06/ 88 73 - 19
Fax: 03 72 06/ 88 73 - 60
E-Mail: r.buergel at unicontrol.de
Internet: www.unicontrol.de
Unicontrol Systemtechnik GmbH
Geschäftsführer: Dipl.-Ing. Siegfried Heinze
Sitz der Gesellschaft: Frankenberg
Registergericht: Amtsgericht Chemnitz, HRB 15 475
More information about the Linuxppc-dev
mailing list