summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Schulz <[email protected]>2025-11-19 18:01:15 +0100
committerTom Rini <[email protected]>2025-12-05 13:38:09 -0600
commitc4594242aafc3452948a6b57dfbaacdfb4ed0860 (patch)
tree93df78019fee580bc6a1691ac585eb86f5bc83a5
parentb06e52f2ea937077b3ff8296e4a67648138ac897 (diff)
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 <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
-rw-r--r--arch/arm/lib/crt0.S3
-rw-r--r--cmd/legacy_led.c6
-rw-r--r--common/board_f.c14
-rw-r--r--doc/api/led.rst16
-rw-r--r--drivers/led/Kconfig14
-rw-r--r--drivers/misc/gpio_led.c18
-rw-r--r--include/status_led.h12
7 files changed, 0 insertions, 83 deletions
diff --git a/arch/arm/lib/crt0.S b/arch/arm/lib/crt0.S
index 9acaf2cddef..d10c129705d 100644
--- a/arch/arm/lib/crt0.S
+++ b/arch/arm/lib/crt0.S
@@ -183,9 +183,6 @@ here:
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 */
diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c
index 2c6d606f48b..4e0d09522ad 100644
--- a/cmd/legacy_led.c
+++ b/cmd/legacy_led.c
@@ -45,9 +45,6 @@ static const led_tbl_t led_commands[] = {
{ "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 }
};
@@ -159,9 +156,6 @@ U_BOOT_CMD(
"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)"
);
diff --git a/common/board_f.c b/common/board_f.c
index 74571cb6d91..df2b0dc899b 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -55,20 +55,6 @@
DECLARE_GLOBAL_DATA_PTR;
/*
- * TODO([email protected]): 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?
*
diff --git a/doc/api/led.rst b/doc/api/led.rst
index 6889f487851..9ae3f5fe252 100644
--- a/doc/api/led.rst
+++ b/doc/api/led.rst
@@ -57,9 +57,6 @@ Some other LED macros
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:
@@ -71,19 +68,6 @@ __led_set is called to change the state of the LED.
__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
diff --git a/drivers/led/Kconfig b/drivers/led/Kconfig
index 6b043f9a522..cc715ceb286 100644
--- a/drivers/led/Kconfig
+++ b/drivers/led/Kconfig
@@ -400,20 +400,6 @@ config LED_STATUS_BOOT
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"
diff --git a/drivers/misc/gpio_led.c b/drivers/misc/gpio_led.c
index a1432a53440..1e2f83cca93 100644
--- a/drivers/misc/gpio_led.c
+++ b/drivers/misc/gpio_led.c
@@ -50,21 +50,3 @@ void __led_toggle(led_id_t mask)
{
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 */
diff --git a/include/status_led.h b/include/status_led.h
index 8e8b19f8c19..c3ff399b1ae 100644
--- a/include/status_led.h
+++ b/include/status_led.h
@@ -65,16 +65,4 @@ static inline void status_led_set(int led, int state) { }
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_ */