From: Quentin Schulz Date: Wed, 19 Nov 2025 17:27:27 +0000 (+0100) Subject: board: BuS: remove support for BOOT LED X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=417254ff08ef6647fd73c6963c95ba06015699df;p=thirdparty%2Fu-boot.git board: BuS: remove support for BOOT LED 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 --- diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index c254da62bf4..cdd862c57d2 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -14,7 +14,6 @@ #include #include #include -#include #include /*---------------------------------------------------------------------------*/ @@ -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 */ diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig index 00f24533021..e7a78b656a0 100644 --- a/configs/eb_cpu5282_defconfig +++ b/configs/eb_cpu5282_defconfig @@ -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 diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig index c6cd3c74f08..137b346e569 100644 --- a/configs/eb_cpu5282_internal_defconfig +++ b/configs/eb_cpu5282_internal_defconfig @@ -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