All of lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] flat tree clock setting
Date: Thu, 09 Nov 2006 15:23:46 -0600	[thread overview]
Message-ID: <45539C62.6050900@freescale.com> (raw)
In-Reply-To: <4553652A.1040606@freescale.com>

Scott Wood wrote:

> Are there any boards on which OF_TBCLK is (properly) set to something 
> other than what get_tbclk() returns (ignoring the difference in 
> rounding)?  

A search of the source code shows this:

File /temp/u-boot-83xx/include/configs/MPC8349EMDS.h
   332 2:#define OF_TBCLK		(bd->bi_busfreq / 4)
File /temp/u-boot-83xx/include/configs/MPC8349ITX.h
   395 2:#define OF_TBCLK		(bd->bi_busfreq / 4)
File /temp/u-boot-83xx/include/configs/MPC8360EMDS.h
   327 2:#define OF_TBCLK		(bd->bi_busfreq / 4)
File /temp/u-boot-83xx/include/configs/MPC8540ADS.h
   309 2:#define OF_TBCLK		(bd->bi_busfreq / 8)
File /temp/u-boot-83xx/include/configs/MPC8541CDS.h
   320 2:#define OF_TBCLK		(bd->bi_busfreq / 8)
File /temp/u-boot-83xx/include/configs/MPC8548CDS.h
   326 2:#define OF_TBCLK		(bd->bi_busfreq / 8)
File /temp/u-boot-83xx/include/configs/MPC8555CDS.h
   320 2:#define OF_TBCLK		(bd->bi_busfreq / 8)
File /temp/u-boot-83xx/include/configs/MPC8560ADS.h
   302 2:#define OF_TBCLK		(bd->bi_busfreq / 8)
File /temp/u-boot-83xx/include/configs/MPC8641HPCN.h
   269 2:#define OF_TBCLK	(bd->bi_busfreq / 4)
File /temp/u-boot-83xx/include/configs/stxxtc.h
   587 2:#define OF_TBCLK		(MPC8XX_HZ / 16)

Let's ignore the stxxtc for now, whatever that is.

On the 83xx, get_tbclk() returns "(gd->bus_clk + 3L) / 4L".  On 85xx and 86xx, 
it does this:

	get_sys_info(&sys_info);
	return ((sys_info.freqSystemBus + 7L) / 8L);

sys_info.freqSystemBus can be any number of things (see get_sys_info).

Well, it looks like they COULD always contain the same value.

> I don't see any, nor can I think of a reason why such a 
> difference should ever exist.  Perhaps OF_TBCLK should just be removed?

I think it's safe to say that *something* is redundant here, but I don't know 
yet what.  My vote would be for OF_TBCLK, though, if that works.

The only thing I know for sure is that all of this clock stuff is making me 
cuckoo.

-- 
Timur Tabi
Linux Kernel Developer @ Freescale

  reply	other threads:[~2006-11-09 21:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-09 16:49 [U-Boot-Users] flat tree clock setting David Updegraff
2006-11-09 17:07 ` Timur Tabi
2006-11-09 17:28   ` Scott Wood
2006-11-09 21:23     ` Timur Tabi [this message]
2006-11-09 23:15     ` Timur Tabi
2006-11-09 17:08 ` Wolfgang Denk

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=45539C62.6050900@freescale.com \
    --to=timur@freescale.com \
    --cc=u-boot@lists.denx.de \
    /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.