linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Ann <ktdann@gmail.com>
To: "Mark A. Greer" <mgreer@mvista.com>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: Best way to determine tb_ticks_per_jiffy inside todc_calibrate_decr()
Date: Sat, 9 Apr 2005 10:29:57 +0900	[thread overview]
Message-ID: <9b7ca6570504081829cb84a7d@mail.gmail.com> (raw)
In-Reply-To: <4256CE41.1000404@mvista.com>

On Apr 9, 2005 3:32 AM, Mark A. Greer <mgreer@mvista.com> wrote:
> If you don't have an RTC, you shouldn't be using any todc_xxx routines.

Yeah, I figured this much :)

> There are several platform files that explicitly set tb_ticks_per_jiffy
> and tb_to_us.  Did you try looking at those?

Actually that didnt occur to me since I thought it was related to the
supplied oscillator. Not knowing what their board is equiped with, I
couldnt trust their value any more than my estimated value. But
reading your next comment, it seems that it's related to processor as
well.

> Also, 33MHz does not sound right but then you don't say what processor
> you're using so who knows.  You need to find the bus freq used by the
> cpu/system.  Try looking for the freq of the processor's SYSCLK input.
> Then you probably have to divide that by 4 to get the frequency that the
> decrementer runs at.  That's the value that you should use for the
> 'freq' variable in the example code you included in your email.

Okay guess I had all these things mixed up in head. What I should have
said is, source to PCI_SYNC_IN is 33MHz.
Anyway, following the MPC8245 hardware Spec pdf file, I was able to
find the peripheral logic/memory bus clock to be 99,000,000. Dividing
that by 4 like you said, gave me the value of 24,750,000. Which is
I've used it to get very real 1 second :)

BTW, why do you have to divide it by 4 ?

-- 
Daniel

  reply	other threads:[~2005-04-09  1:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-08  8:45 Best way to determine tb_ticks_per_jiffy inside todc_calibrate_decr() Daniel Ann
2005-04-08 18:32 ` Mark A. Greer
2005-04-09  1:29   ` Daniel Ann [this message]
2005-04-11 18:39     ` Mark A. Greer
2005-04-12  3:55       ` Daniel Ann

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=9b7ca6570504081829cb84a7d@mail.gmail.com \
    --to=ktdann@gmail.com \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=mgreer@mvista.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).