mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-11 13:08:31 -04:00
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>
This commit is contained in:
parent
6882b5a79a
commit
01815c2d06
@ -346,6 +346,9 @@ void status_led_set (int led, int state);
|
|||||||
#elif defined(CONFIG_NIOS2)
|
#elif defined(CONFIG_NIOS2)
|
||||||
/* XXX empty just to avoid the error */
|
/* XXX empty just to avoid the error */
|
||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
|
#elif defined(CONFIG_BLACKFIN)
|
||||||
|
/* XXX empty just to avoid the error */
|
||||||
|
/************************************************************************/
|
||||||
#elif defined(CONFIG_V38B)
|
#elif defined(CONFIG_V38B)
|
||||||
|
|
||||||
# define STATUS_LED_BIT 0x0010 /* Timer7 GPIO */
|
# define STATUS_LED_BIT 0x0010 /* Timer7 GPIO */
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <net.h>
|
#include <net.h>
|
||||||
#include <timestamp.h>
|
#include <timestamp.h>
|
||||||
|
#include <status_led.h>
|
||||||
#include <version.h>
|
#include <version.h>
|
||||||
|
|
||||||
#include <asm/cplb.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) */
|
/* Initialize the console (after the relocation and devices init) */
|
||||||
console_init_r();
|
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 */
|
/* Initialize from environment */
|
||||||
if ((s = getenv("loadaddr")) != NULL)
|
if ((s = getenv("loadaddr")) != NULL)
|
||||||
load_addr = simple_strtoul(s, NULL, 16);
|
load_addr = simple_strtoul(s, NULL, 16);
|
||||||
@ -445,6 +451,10 @@ void board_init_r(gd_t * id, ulong dest_addr)
|
|||||||
|
|
||||||
void hang(void)
|
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");
|
puts("### ERROR ### Please RESET the board ###\n");
|
||||||
while (1)
|
while (1)
|
||||||
/* If a JTAG emulator is hooked up, we'll automatically trigger
|
/* If a JTAG emulator is hooked up, we'll automatically trigger
|
||||||
|
Loading…
x
Reference in New Issue
Block a user