[U-Boot-Users] ppc4xx/serial.c

Laurent Mohin laurent.mohin at acterna.com
Tue Jul 13 10:19:27 CEST 2004


Hello,

udiv = (clk + tmp / 2) / tmp;

is a classical way of having the result of (clk/tmp) rounded off to the 
nearest amount eg 25.78 to 26.

Laurent

P.S : un petit aparté en français - N'envoie pas tes messages à la liste 
<u-boot-users-admin at lists.sourceforge.net>, sinon tu vas te faire disputer 
par Wolfgang Denk





Seingier François-Xavier <Francois-Xavier.Seingier at thomson.net>
13/07/04 10:08

 
        To:     "Laurent Mohin" <laurent.mohin at acterna.com>
        cc:     "U-Boot-Users \(E-mail\)" <u-boot-users at lists.sourceforge.net>, 
<u-boot-users-admin at lists.sourceforge.net>
        Subject:        RE: [U-Boot-Users] ppc4xx/serial.c


hello,

> What's exactly your problem? 
> 
> Give us your cpu_freq value and desired baudrate so that we can help.
> 

Actually, I modified the serial.c file so that udiv and bdiv are 
calculated as I explained in the previous post and it works. In fact, I 
was wondering if the original operations were correct? For example, I 
cannot figure out the meaning of udiv = (clk + tmp / 2) / tmp and all 
these operations are rather confusing 8-/

regards,

François-Xavier SEINGIER







More information about the U-Boot mailing list