public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions
Date: Thu, 05 Nov 2009 23:43:28 +0100	[thread overview]
Message-ID: <20091105224328.27F1B3F6EC@gemini.denx.de> (raw)
In-Reply-To: <4AF339E1.9060809@windriver.com>

Dear Tom,

In message <4AF339E1.9060809@windriver.com> you wrote:
>
> The arguments for using weak are getting weak :P

:-P

> Using weak is less relevant with the #ifdef's

But it's the wrong direction your heading. We should get rid of
#ifdef's, not add new ones.

With #ifdef's, you have different versions of the code, which
increases the multitude of configurations that actually need to be
tested. With weak, you have one version of the code only. 

> The benefit now is that boards that use the led functions do
> not have to define all of them.

That's just an indication of a broken implementation.

Normally you would provide the weak functions in a central place,
where any board configuration which wants can overwrite them, or not.

> I am open to ideas on how to kill weak off completely.

You got it wrong.

We want to kill off the #ifdef's.

> Has a general led driver layer ever been proposed ?
> Something to convert status led for a mixture of #defines and weak
> symbols to something that had a register function and some
> file_ops ?

We use status LEDs on many boards, without real issues. It's only AT91
which suffers from this mess.

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
"There is nothing new under the sun, but there are lots of old things
we don't know yet."                                  - Ambrose Bierce

  reply	other threads:[~2009-11-05 22:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-04  0:00 [U-Boot] ARM LED weak symbols Tom Rix
2009-11-04  0:00 ` [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions Tom Rix
2009-11-04  0:00   ` [U-Boot] [PATCH 2/2] ARM: fix build error with gcc-4.4.2 about inline function declared weak Tom Rix
2009-11-04  0:34     ` [U-Boot] multiple partitions in mtdparts myuboot at fastmail.fm
2009-11-04  7:14       ` Dieter Kiermaier
2009-11-04 15:35         ` myuboot at fastmail.fm
2009-11-04 15:57           ` Wolfgang Denk
2009-11-05 20:19     ` [U-Boot] [PATCH 2/2] ARM: fix build error with gcc-4.4.2 about inline function declared weak Wolfgang Denk
2009-11-05 20:39       ` Tom
2009-11-05 22:38         ` Wolfgang Denk
2009-11-10 19:34           ` Tom
2009-11-10 22:45             ` Wolfgang Denk
2009-11-12  0:43               ` [U-Boot] ARM pull request Tom
2009-11-15 21:39                 ` Wolfgang Denk
2009-11-11 16:53           ` [U-Boot] [PATCH 2/2] ARM: fix build error with gcc-4.4.2 about inline function declared weak Gaye Abdoulaye Walsimou
2009-11-05 20:24   ` [U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions Wolfgang Denk
2009-11-05 20:47     ` Tom
2009-11-05 22:43       ` Wolfgang Denk [this message]
2009-11-05 23:33         ` Tom
2009-11-12 15:17           ` Alessandro Rubini
2009-11-12 15:59             ` Tom

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=20091105224328.27F1B3F6EC@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox