[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

Wolfgang Denk wd at denx.de
Thu Aug 6 16:19:15 CEST 2009


Dear Alessandro Rubini,

In message <20090806133110.GA26906 at mail.gnudd.com> you wrote:
> 
> Since the timeout is an error condition, It's better to have it longer
> than shorter. Since integer division truncates towards 0, I'd better
> give my hardware more time before signalling an error (an unlikely

That's why I recommended to use DIV_ROUND_UP().


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: wd at denx.de
Many companies that have made themselves dependent on [the  equipment
of  a  certain  major  manufacturer] (and in doing so have sold their
soul to the devil) will collapse under the sheer weight  of  the  un-
mastered complexity of their data processing systems.
          -- Edsger W. Dijkstra, SIGPLAN Notices, Volume 17, Number 5


More information about the U-Boot mailing list