diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-10-06 03:52:24 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-01-28 13:26:12 -0500 |
commit | 01815c2d06c5b838f2cd536703e47bd2c9148194 (patch) | |
tree | 467932e1ddde5b2cf03e4b5dcf42059bda785260 /lib_blackfin | |
parent | 6882b5a79a3247494b62c05015fa672557f1bfaa (diff) | |
download | bootable_bootloader_goldelico_gta04-01815c2d06c5b838f2cd536703e47bd2c9148194.zip bootable_bootloader_goldelico_gta04-01815c2d06c5b838f2cd536703e47bd2c9148194.tar.gz bootable_bootloader_goldelico_gta04-01815c2d06c5b838f2cd536703e47bd2c9148194.tar.bz2 |
Blackfin: implement general support for CONFIG_STATUS_LED
Here are the Blackfin-specific and board-independent pieces for status leds.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'lib_blackfin')
-rw-r--r-- | lib_blackfin/board.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c index 30ffba1..dcf246d 100644 --- a/lib_blackfin/board.c +++ b/lib_blackfin/board.c @@ -16,6 +16,7 @@ #include <malloc.h> #include <net.h> #include <timestamp.h> +#include <status_led.h> #include <version.h> #include <asm/cplb.h> @@ -409,6 +410,11 @@ void board_init_r(gd_t * id, ulong dest_addr) /* Initialize the console (after the relocation and devices init) */ console_init_r(); +#ifdef CONFIG_STATUS_LED + status_led_set(STATUS_LED_BOOT, STATUS_LED_BLINKING); + status_led_set(STATUS_LED_CRASH, STATUS_LED_OFF); +#endif + /* Initialize from environment */ if ((s = getenv("loadaddr")) != NULL) load_addr = simple_strtoul(s, NULL, 16); @@ -445,6 +451,10 @@ void board_init_r(gd_t * id, ulong dest_addr) void hang(void) { +#ifdef CONFIG_STATUS_LED + status_led_set(STATUS_LED_BOOT, STATUS_LED_OFF); + status_led_set(STATUS_LED_CRASH, STATUS_LED_BLINKING); +#endif puts("### ERROR ### Please RESET the board ###\n"); while (1) /* If a JTAG emulator is hooked up, we'll automatically trigger |