Hugo Villeneuve wrote: > [EMAIL PROTECTED] wrote: >> This formula is better at avoiding integer overflow. > > This patch doesn´t round the value correctly. > > Wolfgang, I will resubmit a new patch shortly today to fix the problem. > > Hugo V.
Arrgh, you are right. I know you solved it already, but for the record I oversimplified: (gd->baudrate / 2) should have been: (gd->baudrate * (MODE_X_DIV / 2)) WRONG: + return (CFG_NS16550_CLK + (gd->baudrate / 2)) / + (MODE_X_DIV * gd->baudrate); should have been + return (CFG_NS16550_CLK + (gd->baudrate * (MODE_X_DIV / 2))) / + (MODE_X_DIV * gd->baudrate); Sorry, gvb ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users