* [U-Boot-Users] get_timer versus get_ticks
@ 2006-12-08 12:23 Robert Deliën
0 siblings, 0 replies; only message in thread
From: Robert Deliën @ 2006-12-08 12:23 UTC (permalink / raw)
To: u-boot
Hello,
I am currently straightening out lib-mips/time.c to make its granularity
defined by CFG_HZ (=1000) instead of the processor?s frequency at which MIPS
counters normally run.
Can somebody explain me what the difference between get_timer and get_ticks
is? Get_timer returns the current value of the timer in 1/CFG_HZ units, as I
would expect. I would expect get_ticks to return the raw counter value, but
that value would useless because there?s no way to tell what speed it?s
running at: get_tbclk is returning CFG_HZ and not the actual counter
incremental frequency. In common/main.c get_ticks is used in conjuction with
get_tbclk as if it were get_timer. This indicates either get_tbclk should be
returning the actual counter incremental frequency, or get_ticks to return
the same value as get_timer(0).
I have looked at the PPC implementation, but that wasn?t of much help
because there a hardware time base is used so that solution always correct.
Thanks in advance!
With kind regards,
Robert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20061208/daa777b0/attachment.htm
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-08 12:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-08 12:23 [U-Boot-Users] get_timer versus get_ticks Robert Deliën
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox