From: "Grant Likely" <grant.likely@secretlab.ca>
To: khollan <khollan@daktronics.com>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: System Clock runaway on Xilinx platform
Date: Wed, 6 Feb 2008 13:29:18 -0700 [thread overview]
Message-ID: <fa686aa40802061229w3c6ae051kec18d1d25ad1da4@mail.gmail.com> (raw)
In-Reply-To: <15312437.post@talk.nabble.com>
On 2/6/08, khollan <khollan@daktronics.com> wrote:
>
> Hi all,
>
> Thanks for the help so far!
> I'm now running linux 2.6.21 on my custom virtex 4 board modeled after the
> ml410. The cpu clock is 300MHz and the PLB bus is 175MHz.
>
> My question is which clock is the linux system clock that keeps track of the
> date derived from? I set my date with rdate -s time.mit.edu at boot and
> then compare with the date command and rdate -p time.mit.edu and they are
> off by 20 or so seconds even just after a few minutes, this trend continues
> and it will be off by a day after a few hours. I think I just don't have
> something defined correctly but I can't figure out which.
The clock is maintained off of the PowerPC time base register (TBL,
TBU). On Virtex ppc platforms, the time base frequency is supposed to
be the same as the CPU clock. Can you figure out *exactly* how
quickly the clock is drifting?
How are you booting your Virtex platform? u-boot or a zImage.elf? If
it's a zImage, the CPU clock frequency is set in
arch/ppc/boot/simple/embed_config.c (search for CONFIG_XILINX and look
for the line that sets bd->bi_intfreq). Make XPAR_CORE_CLOCK_FREQ_HZ
in xparameters matches you CPU clock speed.
Side note: you may notice that bd->bi_tbfreq is also used but not set;
that's because bd->bi_intfreq and bd->tbfreq point to the same memory
location. (It's kind of messed up that way, don't worry too much
about it)
If you're using u-boot, then u-boot will set the cpu frequency in the
board info structure.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2008-02-06 20:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-06 19:41 System Clock runaway on Xilinx platform khollan
2008-02-06 20:29 ` Grant Likely [this message]
2008-02-06 22:39 ` Kevin Holland
2008-02-06 22:52 ` Grant Likely
2008-02-07 16:07 ` khollan
2008-02-07 0:10 ` Stephen Neuendorffer
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=fa686aa40802061229w3c6ae051kec18d1d25ad1da4@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=khollan@daktronics.com \
--cc=linuxppc-embedded@ozlabs.org \
/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).