All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: avorontsov@ru.mvista.com
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] [POWERPC] 8xx: timebase frequency should not depend on bus-frequency
Date: Thu, 21 Feb 2008 14:06:58 -0600	[thread overview]
Message-ID: <47BDD9E2.5050007@freescale.com> (raw)
In-Reply-To: <20080221195918.GA14636@localhost.localdomain>

Anton Vorontsov wrote:
> On Thu, Feb 21, 2008 at 01:48:23PM -0600, Scott Wood wrote:
>> Anton Vorontsov wrote:
>>> diff --git a/arch/powerpc/platforms/8xx/m8xx_setup.c 
>>> b/arch/powerpc/platforms/8xx/m8xx_setup.c
>>> index 184f998..0d9f75c 100644
>>> --- a/arch/powerpc/platforms/8xx/m8xx_setup.c
>>> +++ b/arch/powerpc/platforms/8xx/m8xx_setup.c
>>> @@ -111,17 +111,12 @@ void __init mpc8xx_calibrate_decr(void)
>>>
>>> 	/* Processor frequency is MHz.
>>> 	 */
>>> -	ppc_tb_freq = 50000000;
>>> -	if (!get_freq("bus-frequency", &ppc_tb_freq)) {
>>> -		printk(KERN_ERR "WARNING: Estimating decrementer frequency "
>>> -		                "(not found)\n");
>>> -	}
>>> -	ppc_tb_freq /= 16;
>>> 	ppc_proc_freq = 50000000;
>>> 	if (!get_freq("clock-frequency", &ppc_proc_freq))
>>> 		printk(KERN_ERR "WARNING: Estimating processor frequency "
>>> 		                "(not found)\n");
>>>
>>> +	ppc_tb_freq = ppc_proc_freq / 16;
>> Shouldn't we just use the timebase-frequency property?
> 
> Nope. Most u-boots currently do not setup timebase-frequency, and if
> they are setting it up, they're doing it wrong, in sense that Linux
> overwrites timebase setup (yeah, in this regard MPC8xx is special).

Current u-boots don't support device trees at all on 8xx.  The most 
recent 8xx FDT patch I saw called get_tbclk() to fill in 
timebase-frequency; does get_tbclk() not work?

Obviously, when booting with a cuImage we can't use u-boot's value, 
since it's not in the bd_t.  In that case, we should fix the wrapper's 
calculation of the timebase frequency.

-Scott

  reply	other threads:[~2008-02-21 20:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-21 19:45 [PATCH] [POWERPC] 8xx: timebase frequency should not depend on bus-frequency Anton Vorontsov
2008-02-21 19:48 ` Scott Wood
2008-02-21 19:59   ` Anton Vorontsov
2008-02-21 20:06     ` Scott Wood [this message]
2008-02-21 21:13       ` Anton Vorontsov
2008-02-21 21:20         ` Scott Wood
2008-02-21 23:41           ` Anton Vorontsov
2008-02-22 13:01             ` Bryan O'Donoghue

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=47BDD9E2.5050007@freescale.com \
    --to=scottwood@freescale.com \
    --cc=avorontsov@ru.mvista.com \
    --cc=linuxppc-dev@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 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.