From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Althoefer Date: Tue, 16 Dec 2008 22:50:23 +0100 Subject: [U-Boot] [PATCH] IXP425: Fixing timer code Part 1/1 In-Reply-To: <20081215232625.2BBDC832E8A1@gemini.denx.de> References: <49384728.LMggwd1oTzMugOAp%stefan.althoefer@web.de> <20081215232625.2BBDC832E8A1@gemini.denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk schrieb: > Dear Stefan Althoefer, > > In message <49384728.LMggwd1oTzMugOAp%stefan.althoefer@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