In message <[EMAIL PROTECTED]> you wrote: > We should use the algorithm in the Linux kernel so that the UART divisor > calculation is more accurate. It also fixes problems on some picky UARTs > that have sampling anomalies. > > Signed-off-by: Mike Frysinger <[EMAIL PROTECTED]> > --- > cpu/blackfin/serial.h | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/cpu/blackfin/serial.h b/cpu/blackfin/serial.h > index 1f0f4b4..d268da5 100644 > --- a/cpu/blackfin/serial.h > +++ b/cpu/blackfin/serial.h > @@ -179,7 +179,7 @@ static inline void serial_early_set_baud(uint32_t baud) > * The +1 is to make sure we over sample just a little ^^^^^^^^^^^^^^^^^^^
Fix! > * rather than under sample the incoming signals. > */ > - uint16_t divisor = (get_sclk() / (baud * 16)) + 1; > + uint16_t divisor = (get_sclk() + (baud * 8)) / (baud * 16); Please make sure to adjust the comment, as there is no "+1" any more in the new code. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED] I am pleased to see that we have differences. May we together become greater than the sum of both of us. -- Surak of Vulcan, "The Savage Curtain", stardate 5906.4 ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users