[U-Boot] [PATCH 1/2] ARM Conditionally compile board LED functions

Tom Tom.Rix at windriver.com
Fri Nov 6 00:33:59 CET 2009


Wolfgang Denk wrote:
> Dear Tom,
> 
> In message <4AF339E1.9060809 at 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. 
> 

To use the status led api, you have to define CONFIG_STATUS_LED anyway.
I did not think this added to the configuration space.

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

My vector is obviously pointing in the wrong direction..

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

I withdraw this patch.
I will rethink this and come up with something better.

Tom

> Best regards,
> 
> Wolfgang Denk
> 



More information about the U-Boot mailing list