BRG setting error

Borsodi Petr Petr.Borsodi at i.cz
Thu Sep 29 19:06:35 EST 2005


Hi all,

I found an error in Baud Rate Generator setting for MPC82XX processors.

The CD field of im_brgcx (x = 1..8) register is set to wrong value. This
field must be set to divisor lowered by 1, in according with doc for
MPC8272 or similar. I have searched 2.4.31 and 2.6.12 kernels.

Please check these functions:

linux-2.4.31\arch\ppc\boot\simple\m8260_tty.c: serial_init
linux-2.4.31\arch\ppc\cpm2_io\commproc.c: cpm2_setbrg
linux-2.4.31\arch\ppc\cpm2_io\commproc.c: cpm2_fastbrg

linux-2.6.12\arch\ppc\boot\simple\m8260_tty.c: serial_init
linux-2.6.12\arch\ppc\syslib\cpm2_common.c: cpm2_setbrg
linux-2.6.12\arch\ppc\syslib\cpm2_common.c: cpm2_fastbrg

This problem is shown only for small divider - for normal UART baud
rates the deviation is slight.

(I think that better approach is round the divisor to nearest value).

Best regards


Petr Borsodi, SW Development
S.ICZ a.s., J.S. Baara 40, 370 01 Ceske Budejovice, Czech Republic





More information about the Linuxppc-embedded mailing list