[U-Boot-Users] PPC CLKIN
Wolfgang Denk
wd at denx.de
Thu Mar 9 00:49:55 CET 2006
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;
> #endif
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?
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The one who says it cannot be done should never interrupt the one who
is doing it.
More information about the U-Boot
mailing list