[U-Boot-Users] Question about setting the sys clk freq based on a pull up on io.
acmay at acmay.homeip.net
Wed Nov 19 03:22:35 CET 2003
On Tue, Nov 18, 2003 at 06:02:29PM -0800, Conn Clark wrote:
> Hello all,
> Our design is based on a 333MHz IBM405EP processor. We wish to
> detect the oscilator speed we are using via a pullup or pulldown resistor
> on an IO line. In order to make our product cheap we were planning to drive
> My problem is how do I go about this without severly modifying
> U-Boots structure. In analyzing how to do this I determined that the
> configuration and reading of the IO pin sould be done in a
> board_pre_init function. This rases the issue of passing values between
> the init functions called by board_init_f. My second issue is how do I
> deal with the two frquencies since only one can be defined as
> CONFIG_SYS_CLK_FREQ(which is used in several places) without sticking
> lots of nasty board specific ifdefs through out the code.
I just have an old copy of the code to look at but for the 405 stuff
_SYS_CLK_FREQ is only used in C code so you can do this in the header
and c code.
#define CONFIG_SYS_CLK_FREQ get_sys_clk_freq()
unsigned int get_sys_clk_freq()
if( *ADDR == 0x1 )
More information about the U-Boot