From: Kevin Holland <khollan@daktronics.com>
To: Grant Likely <grant.likely@secretlab.ca>
Cc: linuxppc-embedded@ozlabs.org
Subject: Re: System Clock runaway on Xilinx platform
Date: Wed, 06 Feb 2008 16:39:36 -0600 [thread overview]
Message-ID: <1202337576.20550.6.camel@kevin-laptop> (raw)
In-Reply-To: <fa686aa40802061229w3c6ae051kec18d1d25ad1da4@mail.gmail.com>
I load with the zImage.elf, so my xparameters are set like this:
#define XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ 300000000
#define XPAR_CORE_CLOCK_FREQ_HZ XPAR_CPU_PPC405_CORE_CLOCK_FREQ_HZ
I took readings every 5 min over a 15 min period and it seems to be
increasing by approximately 50 sec every 5 mins.
Thanks
Kevin
On Wed, 2008-02-06 at 13:29 -0700, Grant Likely wrote:
> 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.
>
next prev parent reply other threads:[~2008-02-06 23:01 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
2008-02-06 22:39 ` Kevin Holland [this message]
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=1202337576.20550.6.camel@kevin-laptop \
--to=khollan@daktronics.com \
--cc=grant.likely@secretlab.ca \
--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).