[U-Boot-Users] PPC CLKIN
DavisG at embeddedplanet.com
Thu Mar 9 14:08:55 CET 2006
Yes. Your suggestion worked fine. Thanks.
On Mar 8, 2006, at 5:49 PM, Wolfgang Denk wrote:
> In message
> <1628E43D99629C46988BE46087A3FBB94B48E7 at ep-01.EmbeddedPlanet.local>
> you wrote:
>> We currently have several PQII and PQIII PrPMC boards that
>> dynamically support PCI bus speeds between 25 MHz and 133 MHz. These
>> boards provide a CPLD register that gives PCI frequency. I would like
>> to take advantage of this register, if possible, within u-boot rather
>> than using a #define such as CONFIG_83XX_CLKIN, CONFIG_8260_CLKIN, or
>> CONFIG_SYS_CLK_FREQ for the input clock frequency to the processor.
>> Is there a suggested method of doing this?
> Yes: don't change the code if there is no reeal need for it.
>> For testing I have implemented the following in get_sys_info() in
>> speed.c for an MPC8560 board:
>> #if !defined (CONFIG_SYS_CLK_FREQ)
>> sysInfo->freqSystemBus = plat_ratio * get_sys_clk(); #else
>> sysInfo->freqSystemBus = plat_ratio * CONFIG_SYS_CLK_FREQ;
> A simple "#define CONFIG_SYS_CLK_FREQ get_sys_clk()" seems to be
> equivalent without need to change anything. Note that I didn't check
> all uses of the CONFIG_SYS_CLK_FREQ variable in the code.
>> The get_sys_clk() function resides in the board code directory. Would
>> this be an acceptable method? It would minimize any impact to other
>> existing boards.
> What about my suggestion?
This should work. It is how the CDS platform works. Take a look at
board/cds/common/cadmus.c and include/configs/*CDS*.h
More information about the U-Boot