[U-Boot] [RFC] Review of U-Boot timer API

Wolfgang Denk wd at denx.de
Tue May 24 16:15:33 CEST 2011


Dear Graeme Russ,

In message <4DDB59CD.2020009 at gmail.com> you wrote:
>
> My preference is to expose SI (and derivative) units of time measurement
> (seconds, milliseconds, microseconds) only to the outside world (drivers,
> stand alone applications etc)

Please delete the "to the outside world ..." part.

> The truth of the matter is, the proposed API will expose both - There will
> be a HAL function get_ticks() which is used by the prescaler and a
> get_tick_frequency() HAL function. So there will be nothing stopping
> someone (apart from a mandate not to) using 'ticks'

I am tempted to NAK this right here.  I would like to see ticks as an
internal implementation detail only, and only be used as far as it is
necessary to provide proper scaled timer services.  All public
interfaces shall always only used scaled units.

Again: what's wrong with the us based udelay() and the ms based
get_timer() we have now?


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
Syntactic sugar causes cancer of the semicolon.
                - Epigrams in Programming, ACM SIGPLAN Sept. 1982


More information about the U-Boot mailing list