
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?
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; #endif
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.
Greg