[U-Boot] [PATCH] IXP425: Fixing timer code Part 1/1

Stefan Althoefer stefan.althoefer at web.de
Tue Dec 16 22:50:23 CET 2008


Wolfgang Denk schrieb:
> Dear Stefan Althoefer,
> 
> In message <49384728.LMggwd1oTzMugOAp%stefan.althoefer at web.de> you wrote:
>> With this patch, this is nonsense. Instead you should use:
>>
>> #ifdef CONFIG_USE_IRQ
>> /* Interrupt driven timer wants system tick here */
>> #define CONFIG_SYS_HZ                  1000
>> #else
>> /* The code in cpu/ixp/timer.c needs timer clock tick in HZ */
>> #define CONFIG_SYS_HZ                  66666666
>> #endif
> 
> No, this is wrong. CONFIG_SYS_HZ should always be 1000, without
> exceptions.
> 
> Best regards,
> 
> Wolfgang Denk
> 

Should I then hide the 66666666 in the code, or define something like
"#define CONFIG_SYS_CLK_FREQ 66666666" ?

In /cpu/ixp/interrupts.c "#define FREQ 66666666" is used privately,
but I don't like this. However, this frequency is the same for all
IXP clock speeds so it does not really need to be in the config file.

-- Stefan



More information about the U-Boot mailing list