[U-Boot-Users] Status LEDs status?

Pantelis Antoniou
2003-06-09T12:18:36Z

Wolfgang Denk wrote:

>In message <3EE46FBE.3020803@intracom.gr> you wrote:
>
>
>>Well the first thing we can do is removing
>>the redundant code.
>>
>>With the following patch I moved the status LED code
>>from the cpu directories and placed it in the drivers
>>directory.
>>
>>The code for mpc8xx is the superset of both
>>the 8260 and 5xx code, so this is the base for it.
>>
>>Patch applies cleanly againt CVS and is tested to
>>build in 8xx/8260/5xx configs that use LEDs.
>>
>>What do you think?
>>
>>
>
>This is exactly what I do NOT want.
>
>I do not want tosee processor specific code in common directories.
>The drivers/ directory is intended for general code that applies for
>all CPUs.
>
>Best regards,
>
>Wolfgang Denk
>
>
Whoa, hold on.

First of all when you have three copies of the the same thing in different
directories there's bound to be trouble.
For example the 8260 & 5xx copies are already slightly out of sync.

Secondly LEDs are board specific and not cpu specific.
It was a coincidence that up to now the LEDs happened to be in cpu ports
and could be groupped under the cpu directories.

I think it is trivial to abstract the led operations into their respective
cpu include files for the common case. The existing board config headers
shouldn't be modified, while allowing other boards to override them.

In this case the status led code would be generic for all configurations
that support them.

Regards

Pantelis