All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Robert Deliën" <robert.delien@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] get_timer versus get_ticks
Date: Fri, 8 Dec 2006 13:23:39 +0100	[thread overview]
Message-ID: <000001c71ac3$b1290970$dfdd9182@code1.emi.philips.com> (raw)

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 

                 reply	other threads:[~2006-12-08 12:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c71ac3$b1290970$dfdd9182@code1.emi.philips.com' \
    --to=robert.delien@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.