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

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


Dear Albert ARIBAUD,

In message <4DDB4C1C.7030301 at aribaud.net> you wrote:
>
> Not sure I still follow what the two options are -- a heads up is welcome.
> However, I do like the simplicity in having a single time unit (ticks)
> for the timer API -- asuming it covers all needs -- and providing other
> time units only as helper functions.

I don't think using ticks is a good idea.  You would need to change
all definitiuons of timeouts and delays and such.

Why not using a scaled unit like microsecods or the currently used
milliseconds?

I wonder why we suddenly have to change everything that has been
working fine for more than a decade (ignoring the large number of
incorrect, incomplete or broken implementations).  But so far we
really never needed anything else but  udelay()  for the typical short
device related timeouts, and  get_time()  for longer, often protocol
defined,  timeouts.

Is there anything wrong with these two solutions, based on standard
units (us and ms) ?

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
Do not follow where the path may lead....go instead where there is no
path and leave a trail.


More information about the U-Boot mailing list