From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Date: Thu, 09 Nov 2006 17:15:38 -0600 Subject: [U-Boot-Users] flat tree clock setting In-Reply-To: <4553652A.1040606@freescale.com> References: <4553605D.5070205@freescale.com> <4553652A.1040606@freescale.com> Message-ID: <4553B69A.4030409@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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)? 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? Ok, I've done some more digging. On PPC, bd->bi_busfreq is the same as gd->bus_clk. In fact, there are a bunch of clocks in bd that are equal to similar values in gd. The bd_t contains info that is passed to non-openfirmware versions of Linux, and the gd_t contains just general globally-defined data. My guess is that anything which isn't directly used to boot non-OF Linux should use the gd structure. So get_tbclk() does the right thing (although the rounding could be wrong), but OF_TBCLK should probably use gd->bus_clk. -- Timur Tabi Linux Kernel Developer @ Freescale