[U-Boot] [RFC] Add 'led' command

Wolfgang Denk wd at denx.de
Fri Nov 5 13:21:15 CET 2010


Dear Jason Kridner,

In message <1288936236-30603-1-git-send-email-jkridner at beagleboard.org> you wrote:
> It is desired to have the led command on the BeagleBoard to allow for some
> interaction in the scripts.
> 
> This patch allows any board implementing the coloured LED API
> to control the LEDs from the console.
> 
> led [green | yellow | red | all ]  [ on | off ]
> 
> or
> 
> led [ 1 | 2 | 3 | all ]  [ on | off ]
> 
> Adds configuration item CONFIG_CMD_LED enabling the command.
> 
> Partially based on patch from Ulf Samuelsson:
> http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html.
> 
> Signed-off-by: Jason Kridner <jkridner at beagleboard.org>
> ---
>  common/Makefile  |    1 +
>  common/cmd_led.c |  207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 208 insertions(+), 0 deletions(-)
>  create mode 100644 common/cmd_led.c

I understand the requirement, but I think it is more than time to come
up with a common solution here instead of adding more and more copies
of very similar code.

We already have:

	arch/arm/cpu/arm920t/ep93xx/led.c
	arch/arm/cpu/arm926ejs/at91/led.c
	board/atmel/at91cap9adk/led.c
	board/atmel/at91rm9200dk/led.c
	board/atmel/at91rm9200ek/led.c
	board/atmel/at91sam9260ek/led.c
	board/atmel/at91sam9261ek/led.c
	board/atmel/at91sam9263ek/led.c
	board/atmel/at91sam9m10g45ek/led.c
	board/atmel/at91sam9rlek/led.c
	board/eukrea/cpu9260/led.c
	board/logicpd/zoom2/led.c
	board/ns9750dev/led.c
	board/psyent/pk1c20/led.c
	board/ronetix/pm9261/led.c
	board/ronetix/pm9263/led.c

Please, let's unify these.

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
Dear Lord: I just want *one* one-armed manager so  I  never  have  to
hear "On the other hand", again.


More information about the U-Boot mailing list