]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
board: BuS: remove support for BOOT LED
authorQuentin Schulz <quentin.schulz@cherry.de>
Wed, 19 Nov 2025 17:27:27 +0000 (18:27 +0100)
committerTom Rini <trini@konsulko.com>
Tue, 16 Dec 2025 17:38:58 +0000 (11:38 -0600)
We are trying to get rid of the legacy LED API and this is one of the
last users.

As far as I understood from the code, only one LED is controllable and
it is a GPIO led. When initializing the LED, it is always enabled
regardless of the passed argument, same for the mask.

In addition, the LED is used as a BOOT LED.

To keep the same behavior, a GPIO driver should be written, then add a
gpio-leds node which makes use of a GPIO from said driver, add the
/options/u-boot/boot-led property pointing at this new GPIO LED node and
then enable CONFIG_LED as well as CONFIG_LED_BOOT. This should result in
the same behavior using the modern framework.

Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
board/BuS/eb_cpu5282/eb_cpu5282.c
configs/eb_cpu5282_defconfig
configs/eb_cpu5282_internal_defconfig

index c254da62bf4385418d599a42c1dda9e8fe64f0c7..cdd862c57d296dbe486cf2e706f952bd92eda5e2 100644 (file)
@@ -14,7 +14,6 @@
 #include <bmp_layout.h>
 #include <env.h>
 #include <init.h>
-#include <status_led.h>
 #include <bus_vcxk.h>
 
 /*---------------------------------------------------------------------------*/
@@ -160,25 +159,6 @@ int misc_init_r(void)
        return 1;
 }
 
-void __led_toggle(led_id_t mask)
-{
-       MCFGPTA_GPTPORT ^= (1 << 3);
-}
-
-void __led_init(led_id_t mask, int state)
-{
-       __led_set(mask, state);
-       MCFGPTA_GPTDDR  |= (1 << 3);
-}
-
-void __led_set(led_id_t mask, int state)
-{
-       if (state == CONFIG_LED_STATUS_ON)
-               MCFGPTA_GPTPORT |= (1 << 3);
-       else
-               MCFGPTA_GPTPORT &= ~(1 << 3);
-}
-
 /*---------------------------------------------------------------------------*/
 
 /* EOF EB+MCF-EV123.c */
index 00f245330215aa720f8eba40eb2bab48407b0abe..e7a78b656a06dff05eaf12823e7cc7b4ca6d7323 100644 (file)
@@ -31,16 +31,9 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_MII_INIT=y
 CONFIG_ENV_OVERWRITE_ETHADDR_ONCE=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
 CONFIG_SYS_RX_ETH_BUFFER=8
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=8
-CONFIG_LED_STATUS_BOOT_ENABLE=y
-CONFIG_LED_STATUS_BOOT=0
-CONFIG_LED_STATUS_CMD=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y
index c6cd3c74f080d4a6b78965613ccddcd74a6d6eae..137b346e5699f8afc0cfb21e21290596a55af002 100644 (file)
@@ -29,16 +29,9 @@ CONFIG_CMD_DHCP=y
 CONFIG_CMD_MII=y
 CONFIG_MII_INIT=y
 CONFIG_ENV_OVERWRITE_ETHADDR_ONCE=y
-CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y
 CONFIG_SYS_RX_ETH_BUFFER=8
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_FSL=y
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=8
-CONFIG_LED_STATUS_BOOT_ENABLE=y
-CONFIG_LED_STATUS_BOOT=0
-CONFIG_LED_STATUS_CMD=y
 CONFIG_MTD=y
 CONFIG_MTD_NOR_FLASH=y
 CONFIG_FLASH_CFI_DRIVER=y