From: Richard Whitlock <richard.whitlo@btconnect.com>
To: Scott Wood <scottwood@freescale.com>
Cc: "richw@netcomuk.co.uk" <richw@netcomuk.co.uk>, linuxppc-dev@ozlabs.org
Subject: Re: Clock / Timebase / Bus Frequencies Help
Date: Tue, 19 Aug 2008 13:23:06 +0100 [thread overview]
Message-ID: <48AABB2A.6030607@btconnect.com> (raw)
In-Reply-To: <20080818155921.GA26475@loki.buserror.net>
Scott,
Thanks for that - you're right - redboot has the wrong crystal frequency
in the cdl for our board.
Cheers,
Richard.
Scott Wood wrote:
> On Mon, Aug 18, 2008 at 07:52:12AM -0400, richw@netcomuk.co.uk wrote:
>
>> We've got an 8347 based board very similar to the A&M asp8347. Core clock
>> is 400MHz. Bus clock is 266666666Hz.
>> According to the data sheet for the 8347, the decrementer clock runs at a
>> quarter of the rate of the bus clock. I have two questions:
>> In arch/powerpc/boot/redboot-83xx.c, the timebase clock is passed to
>> dt_fixup_cpu_clocks() as bi_busfreq / 16. If I leave it like this, my
>> system clock runs approximately 4 times too fast.
>> Can anyone point me in the direction of an explanation for the div by 16
>> rather than 4?
>>
>
> It's a bug, which I pointed out here:
> http://ozlabs.org/pipermail/linuxppc-dev/2008-June/058704.html
>
>
>> If I change the call to dt_fixup_cpu_clocks so that bi_busfreq/4 is passed
>> in, then the clock runs more accurately. However, its still not correct.
>> This gives a decrementer frequency of 66666666Hz, but if I hard code the
>> value to 66000000Hz, the clock runs accurately.
>> Can anyone shed any light on why the value passed in by the boot loader
>> (redboot) seems to be inaccurate.
>>
>
> Redboot probably has the wrong crystal frequency hardcoded.
>
> -Scott
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
>
>
prev parent reply other threads:[~2008-08-19 12:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-18 11:52 Clock / Timebase / Bus Frequencies Help richw
2008-08-18 15:59 ` Scott Wood
2008-08-18 19:43 ` surendranath.moilla
2008-08-19 10:45 ` Richard Whitlock
2008-08-19 13:52 ` surendranath.moilla
2008-08-19 12:23 ` Richard Whitlock [this message]
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=48AABB2A.6030607@btconnect.com \
--to=richard.whitlo@btconnect.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=richw@netcomuk.co.uk \
--cc=scottwood@freescale.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).