[U-Boot] RFC: get_ticks() + get_tbclk()

Reinhard Meyer u-boot at emk-elektronik.de
Tue Sep 21 08:40:44 CEST 2010


Dear Mike Frysinger,
> might want to check out the thread i started over a year ago:
> 	[u-boot] core ticks/timer code
> it delves into these internals and may help you here
> -mike

Thanks for the hint, and sorry to have started the topic again ;)

However it seems no resolution has come up since then.

For me it seems useful to keep both functions and have ticks
increment at a hardware-convenient rate.
If the hardware timer can be prescaled to increment at 1000 Hz that
is fine, but I see no immediate need for that. If the hardware cannot
be prescaled, and software would need to do a 64 bit multiply/divide
on each timer read, that would really be overkill.

timer_reset() prevents you to have nested timeouts (if that ever
comes up)

Reinhard


More information about the U-Boot mailing list