"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

led: remove support for red LED in legacy API

To the exception of red_led_on in the arm-specific assembly code, all
code interacting with the red status LED was guarded by the
CONFIG_LED_STATUS_RED symbol, which is enabled in none of the upstream
defconfigs.

Since the last board which overrode the weak red_led_on function got
migrated to the new LED mechanism, there's also no user of the
arm-specific assembly code anymore, therefore it can be removed along
the other unreachable code sections.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Heiko Schocher <hs@nabladev.com>

authored by

Quentin Schulz and committed by
Tom Rini
c4594242 b06e52f2

-83
-3
arch/arm/lib/crt0.S
··· 183 183 movne r9, r0 184 184 # endif 185 185 186 - #if ! defined(CONFIG_XPL_BUILD) 187 - bl red_led_on 188 - #endif 189 186 /* call board_init_r(gd_t *id, ulong dest_addr) */ 190 187 mov r0, r9 /* gd_t */ 191 188 ldr r1, [r9, #GD_RELOCADDR] /* dest_addr */
-6
cmd/legacy_led.c
··· 45 45 { "5", CONFIG_LED_STATUS_BIT5, NULL, NULL, NULL }, 46 46 #endif 47 47 #endif 48 - #ifdef CONFIG_LED_STATUS_RED 49 - { "red", CONFIG_LED_STATUS_RED, red_led_off, red_led_on, NULL }, 50 - #endif 51 48 { NULL, 0, NULL, NULL, NULL } 52 49 }; 53 50 ··· 158 155 #ifdef CONFIG_LED_STATUS5 159 156 "5|" 160 157 #endif 161 - #endif 162 - #ifdef CONFIG_LED_STATUS_RED 163 - "red|" 164 158 #endif 165 159 "all] [on|off|toggle|blink] [blink-freq in ms]", 166 160 "[led_name] [on|off|toggle|blink] sets or clears led(s)"
-14
common/board_f.c
··· 55 55 DECLARE_GLOBAL_DATA_PTR; 56 56 57 57 /* 58 - * TODO(sjg@chromium.org): IMO this code should be 59 - * refactored to a single function, something like: 60 - * 61 - * void led_set_state(enum led_colour_t colour, int on); 62 - */ 63 - /************************************************************************ 64 - * Coloured LED functionality 65 - ************************************************************************ 66 - * May be supplied by boards if desired 67 - */ 68 - __weak void red_led_on(void) {} 69 - __weak void red_led_off(void) {} 70 - 71 - /* 72 58 * Why is gd allocated a register? Prior to reloc it might be better to 73 59 * just pass it around to each function in this file? 74 60 *
-16
doc/api/led.rst
··· 57 57 CONFIG_STATUS_LED_BOOT is the LED to light when the board is booting. 58 58 This must be a valid LED number (0-5). 59 59 60 - CONFIG_STATUS_LED_RED is the red LED. It is used to signal errors. This must be 61 - a valid LED number (0-5). 62 - 63 60 General LED functions 64 61 ~~~~~~~~~~~~~~~~~~~~~ 65 62 The following functions should be defined: ··· 70 67 __led_set is called to change the state of the LED. 71 68 72 69 __led_toggle is called to toggle the current state of the LED. 73 - 74 - Colour LED 75 - ---------- 76 - 77 - Colour LED's are at present only used by ARM. 78 - 79 - The functions names explain their purpose. 80 - 81 - - red_LED_on 82 - - red_LED_off 83 - 84 - These are weakly defined in arch/arm/lib/board.c to noops. Where applicable, define 85 - these functions in the board specific source. 86 70 87 71 TBD : Describe older board dependent macros similar to what is done for 88 72
-14
drivers/led/Kconfig
··· 400 400 401 401 endif # LED_STATUS_BOOT_ENABLE 402 402 403 - config LED_STATUS_RED_ENABLE 404 - bool "Enable red LED" 405 - help 406 - Enable red status LED. 407 - 408 - if LED_STATUS_RED_ENABLE 409 - 410 - config LED_STATUS_RED 411 - int "Red LED identification" 412 - help 413 - Valid enabled LED device number. 414 - 415 - endif # LED_STATUS_RED_ENABLE 416 - 417 403 config LED_STATUS_CMD 418 404 bool "Enable status LED commands" 419 405
-18
drivers/misc/gpio_led.c
··· 50 50 { 51 51 gpio_set_value(mask, !gpio_get_value(mask)); 52 52 } 53 - 54 - #ifdef CONFIG_GPIO_LED_STUBS 55 - 56 - /* 'generic' override of colored LED stubs, to use GPIO functions instead */ 57 - 58 - #ifdef CONFIG_LED_STATUS_RED 59 - void red_led_on(void) 60 - { 61 - __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON); 62 - } 63 - 64 - void red_led_off(void) 65 - { 66 - __led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF); 67 - } 68 - #endif 69 - 70 - #endif /* CONFIG_GPIO_LED_STUBS */
-12
include/status_led.h
··· 65 65 static inline void status_led_boot_blink(void) { } 66 66 67 67 #endif /* CONFIG_LED_STATUS */ 68 - 69 - /* 70 - * Coloured LEDs API 71 - */ 72 - #ifndef __ASSEMBLY__ 73 - void red_led_on(void); 74 - void red_led_off(void); 75 - #else 76 - .extern red_led_on 77 - .extern red_led_off 78 - #endif 79 - 80 68 #endif /* _STATUS_LED_H_ */