[U-Boot-Users] CFG_HZ value

Umar Quershey umarq at quartics.com
Wed Jun 20 03:30:20 CEST 2007


Hi-

 

How should one define CFG_HZ?  It seems that it's to be set to 1000.
However my system clock speed is not this.  What are the rules for
setting this value?  This constant is used in the timing functions of
some boards.  I am working on implementing the timing functions and have
a hard time understanding how this could be the same across all boards.
I have a timer on my board that I'd like to use to check for timeout
conditions for an SPI Controller driver.  I have adapted the timing
functions in cpu/arm926ejs/omap/timer.c, but there also CFG_HZ is used.
Should I replace the CFG_HZ with my real system clock speed?  BTW, I
have to read a register at boot time to determine what speed I am
running at.  I do this early on and save a variable 'clock_speed' that
other functions can use to determine the system clock speed.

 

Regards,

Umar

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20070619/73b9f90a/attachment.htm 


More information about the U-Boot mailing list