All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] at91: change CONFIG_SYS_HZ to 1000
Date: Thu, 12 Mar 2009 22:36:20 +0100	[thread overview]
Message-ID: <20090312213620.C656B832E8B8@gemini.denx.de> (raw)
In-Reply-To: <49B97998.2080805@vollmann.ch>

Dear Detlef Vollmann,

In message <49B97998.2080805@vollmann.ch> you wrote:
>
> >> +#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.

We do not add dead code or provide other provisions for code that may
exist in out-of-tree ports.

> If these projects change to a current U-Boot version, they

> 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.

Yes, it does clutter the code. It is dead code. We could as well add

	#if 1 != 1
	#error Armageddon!
	#endif

or similar to each and every source fine, just in case hell breaks
lose.

> >> +/* 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.

That's a very obscure reasoning, me thinks. We don't  understand  the
89999598,  so  we  accept  85000000...115000000  ?  That's true vodoo
programming.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Some people march to the beat of a different drummer. And some people
tango!

  reply	other threads:[~2009-03-12 21:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-25  1:58 [U-Boot] [PATCH v2] at91: change CONFIG_SYS_HZ to 1000 Detlef Vollmann
2009-03-11 14:44 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-12 21:07   ` Detlef Vollmann
2009-03-12 21:36     ` Wolfgang Denk [this message]
2009-03-13 15:38       ` Sergey Lapin
2009-04-02 19:11 ` Eric BENARD
2009-04-02 19:06   ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-02 19:47     ` Eric BENARD
2009-04-03 13:15     ` Detlef Vollmann
2009-04-03 13:20       ` Eric BENARD
2009-04-03 13:21         ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-03 14:12           ` Eric BENARD
2009-04-03 14:46           ` Detlef Vollmann
2009-04-03 14:44             ` Jean-Christophe PLAGNIOL-VILLARD
     [not found]             ` <49D6271A.1010205@free.fr>
2009-04-03 15:49               ` Detlef Vollmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090312213620.C656B832E8B8@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.