movne r9, r0
# endif
-#if ! defined(CONFIG_XPL_BUILD)
- bl red_led_on
-#endif
/* call board_init_r(gd_t *id, ulong dest_addr) */
mov r0, r9 /* gd_t */
ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */
#ifdef CONFIG_LED_STATUS5
{ "5", CONFIG_LED_STATUS_BIT5, NULL, NULL, NULL },
#endif
-#endif
-#ifdef CONFIG_LED_STATUS_RED
- { "red", CONFIG_LED_STATUS_RED, red_led_off, red_led_on, NULL },
#endif
{ NULL, 0, NULL, NULL, NULL }
};
#ifdef CONFIG_LED_STATUS5
"5|"
#endif
-#endif
-#ifdef CONFIG_LED_STATUS_RED
- "red|"
#endif
"all] [on|off|toggle|blink] [blink-freq in ms]",
"[led_name] [on|off|toggle|blink] sets or clears led(s)"
DECLARE_GLOBAL_DATA_PTR;
-/*
- * TODO(sjg@chromium.org): IMO this code should be
- * refactored to a single function, something like:
- *
- * void led_set_state(enum led_colour_t colour, int on);
- */
-/************************************************************************
- * Coloured LED functionality
- ************************************************************************
- * May be supplied by boards if desired
- */
-__weak void red_led_on(void) {}
-__weak void red_led_off(void) {}
-
/*
* Why is gd allocated a register? Prior to reloc it might be better to
* just pass it around to each function in this file?
CONFIG_STATUS_LED_BOOT is the LED to light when the board is booting.
This must be a valid LED number (0-5).
-CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be
-a valid LED number (0-5).
-
General LED functions
~~~~~~~~~~~~~~~~~~~~~
The following functions should be defined:
__led_toggle is called to toggle the current state of the LED.
-Colour LED
-----------
-
-Colour LED's are at present only used by ARM.
-
-The functions names explain their purpose.
-
-- red_LED_on
-- red_LED_off
-
-These are weakly defined in arch/arm/lib/board.c to noops. Where applicable, define
-these functions in the board specific source.
-
TBD : Describe older board dependent macros similar to what is done for
TBD : Describe general support via asm/status_led.h
endif # LED_STATUS_BOOT_ENABLE
-config LED_STATUS_RED_ENABLE
- bool "Enable red LED"
- help
- Enable red status LED.
-
-if LED_STATUS_RED_ENABLE
-
-config LED_STATUS_RED
- int "Red LED identification"
- help
- Valid enabled LED device number.
-
-endif # LED_STATUS_RED_ENABLE
-
config LED_STATUS_CMD
bool "Enable status LED commands"
{
gpio_set_value(mask, !gpio_get_value(mask));
}
-
-#ifdef CONFIG_GPIO_LED_STUBS
-
-/* 'generic' override of colored LED stubs, to use GPIO functions instead */
-
-#ifdef CONFIG_LED_STATUS_RED
-void red_led_on(void)
-{
- __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
-}
-
-void red_led_off(void)
-{
- __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
-}
-#endif
-
-#endif /* CONFIG_GPIO_LED_STUBS */
static inline void status_led_boot_blink(void) { }
#endif /* CONFIG_LED_STATUS */
-
-/*
- * Coloured LEDs API
- */
-#ifndef __ASSEMBLY__
-void red_led_on(void);
-void red_led_off(void);
-#else
- .extern red_led_on
- .extern red_led_off
-#endif
-
#endif /* _STATUS_LED_H_ */