[U-Boot-Users] flat tree clock setting

Timur Tabi timur at freescale.com
Fri Nov 10 00:15:38 CET 2006


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




More information about the U-Boot mailing list