From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlef Vollmann Date: Thu, 12 Mar 2009 22:07:36 +0100 Subject: [U-Boot] [PATCH v2] at91: change CONFIG_SYS_HZ to 1000 In-Reply-To: <20090311144430.GD12700@game.jcrosoft.org> References: <1235527085-23900-1-git-send-email-dv@vollmann.ch> <20090311144430.GD12700@game.jcrosoft.org> Message-ID: <49B97998.2080805@vollmann.ch> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Jean-Christophe PLAGNIOL-VILLARD wrote: > On 02:58 Wed 25 Feb , Detlef Vollmann wrote: >> /* >> + * This code essentially ignores the settings of AT91_MASTER_CLOCK >> + * and CONFIG_SYS_HZ, so we just bail out if they're not set to >> + * the canonical values. >> + */ >> +#if (CONFIG_SYS_HZ != 1000) >> +#error "CONFIG_SYS_HZ must be set to 1000 for this CPU" >> +#endif > no need please remove As I already wrote in another message, I don't think so. All current boards that use U-Boot on that chip family need to use a value of 1000000 for CONFIG_SYS_HZ, and most of these config files are not in the public U-Boot tree. If these projects change to a current U-Boot version, they fail. And I prefer a loud compile time fail over a silent runtime fail. And I can't see any reason for not having that check: it doesn't clutter the code, has no measurable effects on compile time, and absolutely no effects for the runtime. >> +/* We leave some leeway for the master clock... */ >> +#if (AT91_MASTER_CLOCK < 85000000) || (AT91_MASTER_CLOCK > 115000000) >> +#error "AT91_MASTER_CLOCK must be set to 100000000 for this CPU" >> +#endif > why? The old implementation simply assumes that AT91_MASTER_CLOCK has a value of 100000000, and I didn't change that. But the config file for afeb9260 sets it to a value of 89999598, and I can't change that as I don't know that board, but it's near enough to 100000000 to accept that. And I noticed that only because I had the check there in the first place, so it didn't compile with MAKEALL when I only checked for the exact value of 100000000. Best Regards, Detlef