From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Herring Date: Mon, 09 Sep 2013 10:02:23 -0500 Subject: [U-Boot] [PATCH] config: consolidate CONFIG_SYS_HZ definition In-Reply-To: <20130909140629.4614D380DE2@gemini.denx.de> References: <1378670088-17602-1-git-send-email-robherring2@gmail.com> <20130909140629.4614D380DE2@gemini.denx.de> Message-ID: <522DE2FF.2080001@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/09/2013 09:06 AM, Wolfgang Denk wrote: > Dear Rob Herring, > > In message <1378670088-17602-1-git-send-email-robherring2@gmail.com> you wrote: >> > ... >> diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h >> index e59ee96..4c25289 100644 >> --- a/include/config_fallbacks.h >> +++ b/include/config_fallbacks.h >> @@ -53,4 +53,8 @@ >> #define HAVE_BLOCK_DEVICE >> #endif >> >> +#ifndef CONFIG_SYS_HZ >> +#define CONFIG_SYS_HZ 1000 >> +#endif > > This should be not a fallback (i. e. default value) which can be > silently overwritten - this should be a mandatory definition that > causes build errors if somebody tries to define a different value. What do I do with current boards that are wrong? I should make all these boards have build errors or fix them to use 1000 which may break them at runtime depending on their possible misuse of CONFIG_SYS_HZ? include/configs/KAREF.h:#define CONFIG_SYS_HZ 100 /* decr freq: 1 ms ticks */ include/configs/M5271EVB.h:#define CONFIG_SYS_HZ 1000000 include/configs/METROBOX.h:#define CONFIG_SYS_HZ 100 /* decr freq: 1 ms ticks */ include/configs/MVBLUE.h:#define CONFIG_SYS_HZ 10000 include/configs/idmr.h:#define CONFIG_SYS_HZ (50000000 / 64) include/configs/mini2440.h:#define CONFIG_SYS_HZ 1562500 include/configs/mx1ads.h:#define CONFIG_SYS_HZ 3686400 include/configs/omap3_zoom2.h:#define CONFIG_SYS_HZ ((V_SCLK) / (2 << CONFIG_SYS_PTV)) include/configs/omap730p2.h:#define CONFIG_SYS_HZ ((CONFIG_SYS_CLK_FREQ)/(2 << CONFIG_SYS_PTV)) include/configs/rsk7203.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER) include/configs/rsk7264.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER) include/configs/rsk7269.h:#define CONFIG_SYS_HZ (CONFIG_SYS_CLK_FREQ / CMT_CLK_DIVIDER) include/configs/scb9328.h:#define CONFIG_SYS_HZ 3686400 /* incrementer freq: 3.6864 MHz */ include/configs/versatile.h:#define CONFIG_SYS_HZ (1000000 / 256) Rob