cpm_setbrg problem

Matvejchikov Ilya matvejchikov at gmail.com
Wed Jun 6 22:30:14 EST 2007


Hi all!

There is a problem in cpm_setbrg (arch/powerpc/sysdev/cpm2_common.c
file) function. When rate 9600 all is OK, but with 115200 it doesn't
work properly. As I see it the following is incorrect:
          *bp = ((BRG_UART_CLK / rate) << 1) | CPM_BRG_EN;
it must be
          *bp = (((BRG_UART_CLK / rate) - 1) << 1) | CPM_BRG_EN;

Best regards,
Matvejchikov Ilya.



More information about the Linuxppc-embedded mailing list