Skip to contentSkip to conversation

led: Remove old status-LED code

PATCH Superseded Simon Glass 4 participants 35 messages Sep 26, 2024 – Oct 1, 2024

Subsystems (7)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

cover led: Remove old status-LED code

There has been an LED framework in U-Boot which uses driver model for about 9 years now. Recent work is underway to improve it and provide more features. It is probably a good time to drop the old code, which is only used by 5 boards:

./tools/qconfig.py -f LED_STATUS
5 matches
eb_cpu5282 eb_cpu5282_internal mx23_olinuxino pinephone socfpga_vining_fpga

This series attempts that.

Simon Glass (27):
led: Drop LED_STATUS_BOARD_SPECIFIC
arm: Drop old LED support
common: doc: Drop old LED support
st: stm32f429: Drop old LED code
led: Make the LED config common
eb_cpu5282: Drop STATUS_LED
mx23_olinuxino: Drop STATUS_LED
pinephone: Drop STATUS_LED
socfpga_vining_fpga: Drop STATUS_LED
led: Drop LED_STATUS from Kconfig
led: Drop the legacy LED command
misc: Drop gpio_led driver
pca9551_led: Delete driver
misc: status_led: Delete driver
m68k: Drop unused status_led.h header file
powerpc: Drop status-LED code
eb_cpu5282: Drop status-LED code
igep00x0: Drop unused status_led.h header file
mx23_olinuxino: Drop status-LED code
vining_fpga: Drop status-LED code
sunxi: Drop status-LED code
common: Drop status-LED code in board_r
image: Drop unused status_led.h header file
ide: Drop unused status_led.h header file
mpc83xx: Drop status-LED code
net: Drop status-LED code
led: Drop status_led header file

 arch/arm/lib/crt0.S                          |   4 -
 arch/m68k/lib/bootm.c                        |   3 -
 arch/powerpc/lib/interrupts.c                |   6 -
 board/BuS/eb_cpu5282/eb_cpu5282.c            |  20 --
 board/isee/igep00x0/igep00x0.c               |   1 -
 board/olimex/mx23_olinuxino/mx23_olinuxino.c |   7 -
 board/softing/vining_fpga/socfpga.c          |   4 -
 board/st/stm32f429-discovery/Makefile        |   1 -
 board/st/stm32f429-discovery/led.c           |  39 ---
 board/sunxi/board.c                          |   6 -
 boot/image.c                                 |   4 -
 cmd/Makefile                                 |   1 -
 cmd/ide.c                                    |   4 -
 cmd/legacy_led.c                             | 185 ----------
 common/board_f.c                             |  22 --
 common/board_r.c                             |  16 -
 configs/eb_cpu5282_defconfig                 |   6 -
 configs/eb_cpu5282_internal_defconfig        |   6 -
 configs/mx23_olinuxino_defconfig             |   8 -
 configs/pinephone_defconfig                  |   5 -
 configs/socfpga_vining_fpga_defconfig        |  11 -
 doc/README.LED                               |  77 -----
 drivers/led/Kconfig                          | 342 +------------------
 drivers/misc/Kconfig                         |  13 -
 drivers/misc/Makefile                        |   3 -
 drivers/misc/gpio_led.c                      | 106 ------
 drivers/misc/pca9551_led.c                   | 170 ---------
 drivers/misc/status_led.c                    | 124 -------
 drivers/timer/mpc83xx_timer.c                |   5 -
 include/configs/eb_cpu5282.h                 |   6 -
 include/status_led.h                         | 102 ------
 net/bootp.c                                  |   7 -
 net/net.c                                    |  33 --
 33 files changed, 11 insertions(+), 1336 deletions(-)
 delete mode 100644 board/st/stm32f429-discovery/led.c
 delete mode 100644 cmd/legacy_led.c
 delete mode 100644 doc/README.LED
 delete mode 100644 drivers/misc/gpio_led.c
 delete mode 100644 drivers/misc/pca9551_led.c
 delete mode 100644 drivers/misc/status_led.c
 delete mode 100644 include/status_led.h
Signature · 1 line
2.43.0
#1 lore raw

PATCH 1/27 led: Drop LED_STATUS_BOARD_SPECIFIC

This is not used by any board and there is a driver model version of LEDs. Drop it.

---

 cmd/legacy_led.c     | 40 ----------------------------------------
 drivers/led/Kconfig  |  6 ------
 include/status_led.h | 13 +------------
 3 files changed, 1 insertion(+), 58 deletions(-)
cmd/legacy_led.c +0 -40
index 50de7e89d8f..ef2135e0dba 100644
@@ -24,26 +24,6 @@ struct led_tbl_s {
 typedef struct led_tbl_s led_tbl_t;
 
 static const led_tbl_t led_commands[] = {
-#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC
-#ifdef CONFIG_LED_STATUS0
-	{ "0", CONFIG_LED_STATUS_BIT, NULL, NULL, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS1
-	{ "1", CONFIG_LED_STATUS_BIT1, NULL, NULL, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS2
-	{ "2", CONFIG_LED_STATUS_BIT2, NULL, NULL, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS3
-	{ "3", CONFIG_LED_STATUS_BIT3, NULL, NULL, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS4
-	{ "4", CONFIG_LED_STATUS_BIT4, NULL, NULL, NULL },
-#endif
-#ifdef CONFIG_LED_STATUS5
-	{ "5", CONFIG_LED_STATUS_BIT5, NULL, NULL, NULL },
-#endif
-#endif
 #ifdef CONFIG_LED_STATUS_GREEN
 	{ "green", CONFIG_LED_STATUS_GREEN, green_led_off, green_led_on, NULL },
 #endif
@@ -148,26 +128,6 @@ int do_legacy_led(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 U_BOOT_CMD(
 	led, 4, 1, do_legacy_led,
 	"["
-#ifdef CONFIG_LED_STATUS_BOARD_SPECIFIC
-#ifdef CONFIG_LED_STATUS0
-	"0|"
-#endif
-#ifdef CONFIG_LED_STATUS1
-	"1|"
-#endif
-#ifdef CONFIG_LED_STATUS2
-	"2|"
-#endif
-#ifdef CONFIG_LED_STATUS3
-	"3|"
-#endif
-#ifdef CONFIG_LED_STATUS4
-	"4|"
-#endif
-#ifdef CONFIG_LED_STATUS5
-	"5|"
-#endif
-#endif
 #ifdef CONFIG_LED_STATUS_GREEN
 	"green|"
 #endif
drivers/led/Kconfig +0 -6
index bee74b25751..5c401f92080 100644
@@ -142,12 +142,6 @@ config LED_STATUS_GPIO
 	  The status LED can be connected to a GPIO pin. In such cases, the
 	  gpio_led driver can be used as a status LED backend implementation.
 
-config LED_STATUS_BOARD_SPECIFIC
-	bool "Specific board"
-	default y
-	help
-	  LED support is only for a specific board.
-
 comment "LEDs parameters"
 
 config LED_STATUS0
include/status_led.h +1 -12
index 6707ab1d29d..3d118af0d8b 100644
@@ -54,23 +54,12 @@ void status_led_set(int led, int state);
    * ADVICE: Define in your board configuration file rather than
    * filling this file up with lots of custom board stuff.
    */
-
-#elif defined(CONFIG_LED_STATUS_BOARD_SPECIFIC)
-/* led_id_t is unsigned long mask */
-typedef unsigned long led_id_t;
-
-extern void __led_toggle (led_id_t mask);
-extern void __led_init (led_id_t mask, int state);
-extern void __led_set (led_id_t mask, int state);
-void __led_blink(led_id_t mask, int freq);
 #else
 # error Status LED configuration missing
 #endif
 /************************************************************************/
 
-#ifndef CONFIG_LED_STATUS_BOARD_SPECIFIC
-# include <asm/status_led.h>
-#endif
+#include <asm/status_led.h>
 
 #endif	/* CONFIG_LED_STATUS	*/
 
Signature · 1 line
2.43.0
#2 lore raw

PATCH 2/27 arm: Drop old LED support

In reply to Simon Glass

This has been replaced with a new LED framework, so drop this old code.

---

 arch/arm/lib/crt0.S | 4 ----
 1 file changed, 4 deletions(-)
arch/arm/lib/crt0.S +0 -4
index a0311438b45..3293e4df63c 100644
@@ -185,10 +185,6 @@ here:
 	movne	r9, r0
 # endif
 
-#if ! defined(CONFIG_SPL_BUILD)
-	bl coloured_LED_init
-	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 */
Signature · 1 line
2.43.0
#3 lore raw

PATCH 3/27 common: doc: Drop old LED support

In reply to Simon Glass

This has been replaced with a new LED framework, so drop this old code and documentation.

---

 common/board_f.c | 22 --------------
 doc/README.LED   | 77 ------------------------------------------------
 2 files changed, 99 deletions(-)
 delete mode 100644 doc/README.LED
common/board_f.c +0 -22
index 154675d0e40..f161a690ec0 100644
@@ -36,7 +36,6 @@
 #include <relocate.h>
 #include <serial.h>
 #include <spl.h>
-#include <status_led.h>
 #include <sysreset.h>
 #include <timer.h>
 #include <trace.h>
@@ -53,27 +52,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 coloured_LED_init(void) {}
-__weak void red_led_on(void) {}
-__weak void red_led_off(void) {}
-__weak void green_led_on(void) {}
-__weak void green_led_off(void) {}
-__weak void yellow_led_on(void) {}
-__weak void yellow_led_off(void) {}
-__weak void blue_led_on(void) {}
-__weak void blue_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?
doc/README.LED deleted +0 -77

77 lines not on this page · raw message

Signature · 1 line
2.43.0
#4 lore raw

PATCH 4/27 st: stm32f429: Drop old LED code

In reply to Simon Glass

This predates the LED framework, so drop it.

---

 board/st/stm32f429-discovery/Makefile |  1 -
 board/st/stm32f429-discovery/led.c    | 39 ---------------------------
 2 files changed, 40 deletions(-)
 delete mode 100644 board/st/stm32f429-discovery/led.c
board/st/stm32f429-discovery/Makefile +0 -1
index 6b02c0fddec..233eafdad3d 100644
@@ -7,4 +7,3 @@
 # Kamil Lulko, <[email protected]>
 
 obj-y	:= stm32f429-discovery.o
-obj-y	+= led.o
board/st/stm32f429-discovery/led.c deleted +0 -39
deleted file mode 100644
index 4b8038341b9..00000000000
@@ -1,39 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2015
- * Kamil Lulko, <[email protected]>
- */
-
-#include <status_led.h>
-#include <asm-generic/gpio.h>
-
-#define RED_LED			110
-#define GREEN_LED		109
-
-void coloured_LED_init(void)
-{
-	gpio_request(RED_LED, "red led");
-	gpio_direction_output(RED_LED, 0);
-	gpio_request(GREEN_LED, "green led");
-	gpio_direction_output(GREEN_LED, 0);
-}
-
-void red_led_off(void)
-{
-	gpio_set_value(RED_LED, 0);
-}
-
-void green_led_off(void)
-{
-	gpio_set_value(GREEN_LED, 0);
-}
-
-void red_led_on(void)
-{
-	gpio_set_value(RED_LED, 1);
-}
-
-void green_led_on(void)
-{
-	gpio_set_value(GREEN_LED, 1);
-}
Signature · 1 line
2.43.0
#5 lore raw

PATCH 5/27 led: Make the LED config common

In reply to Simon Glass

Use an if...endif construct to avoid needing to make everything depend on LED. Make SPL_LED depend on LED since that seems reasonable.

---

 drivers/led/Kconfig | 22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)
drivers/led/Kconfig +12 -10
index 5c401f92080..32f0eade710 100644
@@ -9,9 +9,11 @@ config LED
 	  can provide access to board-specific LEDs. Use of the device tree
 	  for configuration is encouraged.
 
+if LED
+
 config LED_BCM6328
 	bool "LED Support for BCM6328"
-	depends on LED && ARCH_BMIPS
+	depends on ARCH_BMIPS
 	help
 	  This option enables support for LEDs connected to the BCM6328
 	  LED HW controller accessed via MMIO registers.
@@ -22,7 +24,7 @@ config LED_BCM6328
 
 config LED_BCM6358
 	bool "LED Support for BCM6358"
-	depends on LED && ARCH_BMIPS
+	depends on ARCH_BMIPS
 	help
 	  This option enables support for LEDs connected to the BCM6358
 	  LED HW controller accessed via MMIO registers.
@@ -30,28 +32,28 @@ config LED_BCM6358
 
 config LED_BCM6753
 	bool "LED Support for BCM6753"
-	depends on LED && BCM6855
+	depends on BCM6855
 	help
 	  This option enables support for LEDs connected to the BCM6753
 	  HW has blinking and fading capabilities and up to 32 LEDs can be controlled.
 
 config LED_BCM6858
 	bool "LED Support for BCM6858"
-	depends on LED && (BCM6856 || BCM6858 || BCM63158)
+	depends on BCM6856 || BCM6858 || BCM63158
 	help
 	  This option enables support for LEDs connected to the BCM6858
 	  HW has blinking capabilities and up to 32 LEDs can be controlled.
 
 config LED_CORTINA
 	bool "LED Support for Cortina Access CAxxxx SoCs"
-	depends on LED && (CORTINA_PLATFORM)
+	depends on CORTINA_PLATFORM
 	help
 	  This option enables support for LEDs connected to the Cortina
 	  Access CAxxxx SOCs.
 
 config LED_LP5562
 	bool "LED Support for LP5562"
-	depends on LED && DM_I2C
+	depends on DM_I2C
 	help
 	  This option enables support for LEDs connected to the TI LP5562
 	  4 channel I2C LED controller.  Driver fully supports blink on the
@@ -59,14 +61,13 @@ config LED_LP5562
 
 config LED_PWM
 	bool "LED PWM"
-	depends on LED && DM_PWM
+	depends on DM_PWM
 	help
 	  Enable support for LEDs connected to PWM.
 	  Linux compatible ofdata.
 
 config LED_BLINK
 	bool "Support hardware LED blinking"
-	depends on LED
 	help
 	  Some drivers can support automatic blinking of LEDs with a given
 	  period, without needing timers or extra code to handle the timing.
@@ -75,7 +76,6 @@ config LED_BLINK
 
 config LED_SW_BLINK
 	bool "Support software LED blinking"
-	depends on LED
 	select CYCLIC
 	help
 	  Turns on led blinking implemented in the software, useful when
@@ -98,7 +98,7 @@ config SPL_LED
 
 config LED_GPIO
 	bool "LED support for GPIO-connected LEDs"
-	depends on LED && DM_GPIO
+	depends on DM_GPIO
 	help
 	  Enable support for LEDs which are connected to GPIO lines. These
 	  GPIOs may be on the SoC or some other device which provides GPIOs.
@@ -112,6 +112,8 @@ config SPL_LED_GPIO
 	  This option is an SPL-variant of the LED_GPIO option.
 	  See the help of LED_GPIO for details.
 
+endif # LED
+
 config LED_STATUS
 	bool "Enable status LED API"
 	help
Signature · 1 line
2.43.0
#6 lore raw

PATCH 6/27 eb_cpu5282: Drop STATUS_LED

In reply to Simon Glass

This feature is very old and does not use the LED framework. Drop it from this board.

---

 configs/eb_cpu5282_defconfig          | 6 ------
 configs/eb_cpu5282_internal_defconfig | 6 ------
 2 files changed, 12 deletions(-)
configs/eb_cpu5282_defconfig +0 -6
index 271dbdf4dbb..82d28e5cf34 100644
@@ -35,12 +35,6 @@ 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
configs/eb_cpu5282_internal_defconfig +0 -6
index 89a7925dffa..d37127757a5 100644
@@ -33,12 +33,6 @@ 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
Signature · 1 line
2.43.0
#7 lore raw

PATCH 7/27 mx23_olinuxino: Drop STATUS_LED

In reply to Simon Glass

This feature is very old and does not use the LED framework. Drop it from this board.

---

 configs/mx23_olinuxino_defconfig | 8 --------
 1 file changed, 8 deletions(-)
configs/mx23_olinuxino_defconfig +0 -8
index 335de62e84b..febf7f544b3 100644
@@ -39,14 +39,6 @@ CONFIG_USE_BOOTFILE=y
 CONFIG_BOOTFILE="uImage"
 CONFIG_VERSION_VARIABLE=y
 CONFIG_MXS_GPIO=y
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS_GPIO=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=778
-CONFIG_LED_STATUS_STATE=2
-CONFIG_LED_STATUS_BOOT_ENABLE=y
-CONFIG_LED_STATUS_BOOT=0
-CONFIG_LED_STATUS_CMD=y
 CONFIG_MMC_MXS=y
 CONFIG_CONS_INDEX=0
 CONFIG_DM_SERIAL=y
Signature · 1 line
2.43.0
#8 lore raw

PATCH 8/27 pinephone: Drop STATUS_LED

In reply to Simon Glass

This feature is very old and does not use the LED framework. Drop it from this board.

---

 configs/pinephone_defconfig | 5 -----
 1 file changed, 5 deletions(-)
configs/pinephone_defconfig +0 -5
index 9d39204a439..1956eca8815 100644
@@ -11,8 +11,3 @@ CONFIG_MMC_SUNXI_SLOT_EXTRA=2
 CONFIG_PINEPHONE_DT_SELECTION=y
 # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
 CONFIG_OF_LIST="sun50i-a64-pinephone-1.1 sun50i-a64-pinephone-1.2"
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS_GPIO=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=114
-CONFIG_LED_STATUS_STATE=2
Signature · 1 line
2.43.0
#9 lore raw

PATCH 9/27 socfpga_vining_fpga: Drop STATUS_LED

In reply to Simon Glass

This feature is very old and does not use the LED framework. Drop it from this board.

---

 configs/socfpga_vining_fpga_defconfig | 11 -----------
 1 file changed, 11 deletions(-)
configs/socfpga_vining_fpga_defconfig +0 -11
index f64efcff6bd..1a90e129101 100644
@@ -77,17 +77,6 @@ CONFIG_SYS_DFU_DATA_BUF_SIZE=0x1000000
 CONFIG_DWAPB_GPIO=y
 CONFIG_DM_I2C=y
 CONFIG_SYS_I2C_DW=y
-CONFIG_LED_STATUS=y
-CONFIG_LED_STATUS_GPIO=y
-CONFIG_LED_STATUS0=y
-CONFIG_LED_STATUS_BIT=48
-CONFIG_LED_STATUS1=y
-CONFIG_LED_STATUS_BIT1=53
-CONFIG_LED_STATUS2=y
-CONFIG_LED_STATUS_BIT2=54
-CONFIG_LED_STATUS3=y
-CONFIG_LED_STATUS_BIT3=65
-CONFIG_LED_STATUS_CMD=y
 CONFIG_MISC=y
 CONFIG_I2C_EEPROM=y
 CONFIG_SYS_I2C_EEPROM_ADDR=0x50
Signature · 1 line
2.43.0
#10 lore raw

PATCH 10/27 led: Drop LED_STATUS from Kconfig

In reply to Simon Glass

Drop all of these configs, which are now unused.

---

 drivers/led/Kconfig | 316 --------------------------------------------
 1 file changed, 316 deletions(-)
drivers/led/Kconfig +0 -316
index 32f0eade710..f4d47d0f327 100644
@@ -114,320 +114,4 @@ config SPL_LED_GPIO
 
 endif # LED
 
-config LED_STATUS
-	bool "Enable status LED API"
-	help
-	  Allows common u-boot commands to use a board's leds to
-	  provide status for activities like booting and downloading files.
-
-if LED_STATUS
-
-# Hidden constants
-
-config LED_STATUS_OFF
-	int
-	default 0
-
-config LED_STATUS_BLINKING
-	int
-	default 1
-
-config LED_STATUS_ON
-	int
-	default 2
-
-# Hidden constants end
-
-config LED_STATUS_GPIO
-	bool "GPIO status LED implementation"
-	help
-	  The status LED can be connected to a GPIO pin. In such cases, the
-	  gpio_led driver can be used as a status LED backend implementation.
-
-comment "LEDs parameters"
-
-config LED_STATUS0
-	bool "Enable status LED 0"
-
-if LED_STATUS0
-
-config LED_STATUS_BIT
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT is passed into the __led_* functions to identify
-	  which LED is being acted on.  As such, the chosen value must be unique
-	  with respect to the other CONFIG_LED_STATUS_BIT's. Mapping the value
-	  to a physical LED is the responsibility of the __led_* function.
-
-config LED_STATUS_STATE
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ:
-	  LED_STATUS_PERIOD = CONFIG_SYS_HZ/LED_STATUS_FREQ
-	  Values range: 2 - 10
-
-endif # LED_STATUS0
-
-config LED_STATUS1
-	bool "Enable status LED 1"
-
-if LED_STATUS1
-
-config LED_STATUS_BIT1
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT1 is passed into the __led_* functions to
-	  identify which LED is being acted on.  As such, the chosen value must
-	  be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
-	  the value to a physical LED is the responsibility of the __led_*
-	  function.
-
-config LED_STATUS_STATE1
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ1
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ1:
-	  LED_STATUS_PERIOD1 = CONFIG_SYS_HZ/LED_STATUS_FREQ1
-	  Values range: 2 - 10
-
-endif # LED_STATUS1
-
-config LED_STATUS2
-	bool "Enable status LED 2"
-
-if LED_STATUS2
-
-config LED_STATUS_BIT2
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT2 is passed into the __led_* functions to
-	  identify which LED is being acted on.  As such, the chosen value must
-	  be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
-	  the value to a physical LED is the responsibility of the __led_*
-	  function.
-
-config LED_STATUS_STATE2
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ2
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ2:
-	  LED_STATUS_PERIOD2 = CONFIG_SYS_HZ/LED_STATUS_FREQ2
-	  Values range: 2 - 10
-
-endif # LED_STATUS2
-
-config LED_STATUS3
-	bool "Enable status LED 3"
-
-if LED_STATUS3
-
-config LED_STATUS_BIT3
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT3 is passed into the __led_* functions to
-	  identify which LED is being acted on.  As such, the chosen value must
-	  be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
-	  the value to a physical LED is the responsibility of the __led_*
-	  function.
-
-config LED_STATUS_STATE3
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ3
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ3:
-	  LED_STATUS_PERIOD3 = CONFIG_SYS_HZ/LED_STATUS_FREQ3
-	  Values range: 2 - 10
-
-endif # LED_STATUS3
-
-config LED_STATUS4
-	bool "Enable status LED 4"
-
-if LED_STATUS4
-
-config LED_STATUS_BIT4
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT4 is passed into the __led_* functions to
-	  identify which LED is being acted on.  As such, the chosen value must
-	  be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
-	  the value to a physical LED is the responsibility of the __led_*
-	  function.
-
-config LED_STATUS_STATE4
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ4
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ4:
-	  LED_STATUS_PERIOD4 = CONFIG_SYS_HZ/LED_STATUS_FREQ4
-	  Values range: 2 - 10
-
-endif # LED_STATUS4
-
-config LED_STATUS5
-	bool "Enable status LED 5"
-
-if LED_STATUS5
-
-config LED_STATUS_BIT5
-	int "identification"
-	help
-	  CONFIG_LED_STATUS_BIT5 is passed into the __led_* functions to
-	  identify which LED is being acted on.  As such, the chosen value must
-	  be unique with respect to the other CONFIG_LED_STATUS_BIT's. Mapping
-	  the value to a physical LED is the responsibility of the __led_*
-	  function.
-
-config LED_STATUS_STATE5
-	int "initial state"
-	range LED_STATUS_OFF LED_STATUS_ON
-	default LED_STATUS_OFF
-	help
-	  Should be set one of the following:
-	  0 - off
-	  1 - blinking
-	  2 - on
-
-config LED_STATUS_FREQ5
-	int "blink frequency"
-	range 2 10
-	default 2
-	help
-	  The LED blink period calculated from LED_STATUS_FREQ5:
-	  LED_STATUS_PERIOD5 = CONFIG_SYS_HZ/LED_STATUS_FREQ5
-	  Values range: 2 - 10
-
-endif # LED_STATUS5
-
-config LED_STATUS_BOOT_ENABLE
-	bool "Enable BOOT LED"
-	help
-	  Enable to turn an LED on when the board is booting.
-
-if LED_STATUS_BOOT_ENABLE
-
-config LED_STATUS_BOOT
-	int "LED to light when the board is booting"
-	help
-	  Valid enabled LED device number.
-
-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_YELLOW_ENABLE
-	bool "Enable yellow LED"
-	help
-	  Enable yellow status LED.
-
-if LED_STATUS_YELLOW_ENABLE
-
-config LED_STATUS_YELLOW
-	int "Yellow LED identification"
-	help
-	  Valid enabled LED device number.
-
-endif # LED_STATUS_YELLOW_ENABLE
-
-config LED_STATUS_BLUE_ENABLE
-	bool "Enable blue LED"
-	help
-	  Enable blue status LED.
-
-if LED_STATUS_BLUE_ENABLE
-
-config LED_STATUS_BLUE
-	int "Blue LED identification"
-	help
-	  Valid enabled LED device number.
-
-endif # LED_STATUS_BLUE_ENABLE
-
-config LED_STATUS_GREEN_ENABLE
-	bool "Enable green LED"
-	help
-	  Enable green status LED.
-
-if LED_STATUS_GREEN_ENABLE
-
-config LED_STATUS_GREEN
-	int "Green LED identification"
-	help
-	  Valid enabled LED device number (0-5).
-
-endif # LED_STATUS_GREEN_ENABLE
-
-config LED_STATUS_CMD
-	bool "Enable status LED commands"
-
-endif # LED_STATUS
-
 endmenu
Signature · 1 line
2.43.0
#11 lore raw

PATCH 11/27 led: Drop the legacy LED command

In reply to Simon Glass

This is not used by any board. Drop it.

---

 cmd/Makefile     |   1 -
 cmd/legacy_led.c | 145 -----------------------------------------------
 2 files changed, 146 deletions(-)
 delete mode 100644 cmd/legacy_led.c
cmd/Makefile +0 -1
index 91227f1249c..ca57ac86b79 100644
@@ -102,7 +102,6 @@ obj-$(CONFIG_CMD_IRQ) += irq.o
 obj-$(CONFIG_CMD_ITEST) += itest.o
 obj-$(CONFIG_CMD_JFFS2) += jffs2.o
 obj-$(CONFIG_CMD_CRAMFS) += cramfs.o
-obj-$(CONFIG_LED_STATUS_CMD) += legacy_led.o
 obj-$(CONFIG_CMD_LED) += led.o
 obj-$(CONFIG_CMD_LICENSE) += license.o
 obj-y += load.o
cmd/legacy_led.c deleted +0 -145

145 lines not on this page · raw message

Signature · 1 line
2.43.0
#12 lore raw

PATCH 12/27 misc: Drop gpio_led driver

In reply to Simon Glass

This is not used anymore, so drop it.

---

 drivers/misc/Makefile   |   1 -
 drivers/misc/gpio_led.c | 106 ----------------------------------------
 2 files changed, 107 deletions(-)
 delete mode 100644 drivers/misc/gpio_led.c
drivers/misc/Makefile +0 -1
index e53d52c47b3..c4941377b7d 100644
@@ -49,7 +49,6 @@ obj-$(CONFIG_IHS_FPGA) += ihs_fpga.o
 obj-$(CONFIG_IMX8) += imx8/
 obj-$(CONFIG_IMX_ELE) += imx_ele/
 obj-$(CONFIG_LED_STATUS) += status_led.o
-obj-$(CONFIG_LED_STATUS_GPIO) += gpio_led.o
 obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o
 obj-$(CONFIG_$(SPL_TPL_)LS2_SFP) += ls2_sfp.o
 obj-$(CONFIG_$(SPL_)MXC_OCOTP) += mxc_ocotp.o
drivers/misc/gpio_led.c deleted +0 -106

106 lines not on this page · raw message

Signature · 1 line
2.43.0
#13 lore raw

PATCH 13/27 pca9551_led: Delete driver

In reply to Simon Glass

This driver is not used anymore. Drop it.

---

 drivers/misc/Kconfig       |  13 ---
 drivers/misc/Makefile      |   1 -
 drivers/misc/pca9551_led.c | 170 -------------------------------------
 3 files changed, 184 deletions(-)
 delete mode 100644 drivers/misc/pca9551_led.c
drivers/misc/Kconfig +0 -13
index 6009d55f400..23eb509d974 100644
@@ -446,19 +446,6 @@ config SPL_PWRSEQ
 	  device. When the device is started up, its power sequence can be
 	  initiated.
 
-config PCA9551_LED
-	bool "Enable PCA9551 LED driver"
-	help
-	  Enable driver for PCA9551 LED controller. This controller
-	  is connected via I2C. So I2C needs to be enabled.
-
-config PCA9551_I2C_ADDR
-	hex "I2C address of PCA9551 LED controller"
-	depends on PCA9551_LED
-	default 0x60
-	help
-	  The I2C address of the PCA9551 LED controller.
-
 config STM32MP_FUSE
 	bool "Enable STM32MP fuse wrapper providing the fuse API"
 	depends on ARCH_STM32MP && MISC
drivers/misc/Makefile +0 -1
index c4941377b7d..03d87ef8a0e 100644
@@ -57,7 +57,6 @@ obj-$(CONFIG_NPCM_OTP) += npcm_otp.o
 obj-$(CONFIG_NPCM_HOST) += npcm_host_intf.o
 obj-$(CONFIG_NUVOTON_NCT6102D) += nuvoton_nct6102d.o
 obj-$(CONFIG_P2SB) += p2sb-uclass.o
-obj-$(CONFIG_PCA9551_LED) += pca9551_led.o
 obj-$(CONFIG_$(SPL_)PWRSEQ) += pwrseq-uclass.o
 ifdef CONFIG_QFW
 obj-y += qfw.o
drivers/misc/pca9551_led.c deleted +0 -170

170 lines not on this page · raw message

Signature · 1 line
2.43.0
#14 lore raw

PATCH 14/27 misc: status_led: Delete driver

In reply to Simon Glass

This driver is not used anymore. Drop it.

---

 drivers/misc/Makefile     |   1 -
 drivers/misc/status_led.c | 124 --------------------------------------
 2 files changed, 125 deletions(-)
 delete mode 100644 drivers/misc/status_led.c
drivers/misc/Makefile +0 -1
index 03d87ef8a0e..cf6ece919bc 100644
@@ -48,7 +48,6 @@ obj-$(CONFIG_$(SPL_)I2C_EEPROM) += i2c_eeprom.o
 obj-$(CONFIG_IHS_FPGA) += ihs_fpga.o
 obj-$(CONFIG_IMX8) += imx8/
 obj-$(CONFIG_IMX_ELE) += imx_ele/
-obj-$(CONFIG_LED_STATUS) += status_led.o
 obj-$(CONFIG_MPC83XX_SERDES) += mpc83xx_serdes.o
 obj-$(CONFIG_$(SPL_TPL_)LS2_SFP) += ls2_sfp.o
 obj-$(CONFIG_$(SPL_)MXC_OCOTP) += mxc_ocotp.o
drivers/misc/status_led.c deleted +0 -124

124 lines not on this page · raw message

Signature · 1 line
2.43.0
#15 lore raw

PATCH 15/27 m68k: Drop unused status_led.h header file

In reply to Simon Glass

This header file is not used, so drop it.

---

 arch/m68k/lib/bootm.c | 3 ---
 1 file changed, 3 deletions(-)
arch/m68k/lib/bootm.c +0 -3
index 3dcff8076e3..1fa112f8dbf 100644
@@ -15,9 +15,6 @@
 #include <bzlib.h>
 #include <watchdog.h>
 #include <asm/byteorder.h>
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
-# include <status_led.h>
-#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
Signature · 1 line
2.43.0
Acked-by on v1 15/27
#16 lore raw

Acked

Thanks !

Quoted 22 lines · Simon Glass

This header file is not used, so drop it.

---

  arch/m68k/lib/bootm.c | 3 ---
  1 file changed, 3 deletions(-)
arch/m68k/lib/bootm.c +0 -3
index 3dcff8076e3..1fa112f8dbf 100644
@@ -15,9 +15,6 @@
  #include <bzlib.h>
  #include <watchdog.h>
  #include <asm/byteorder.h>
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
-# include <status_led.h>
-#endif
 
  DECLARE_GLOBAL_DATA_PTR;
 
#17 lore raw

PATCH 16/27 powerpc: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 arch/powerpc/lib/interrupts.c | 6 ------
 1 file changed, 6 deletions(-)
arch/powerpc/lib/interrupts.c +0 -6
index 46208ae4c71..a2e7101a9d1 100644
@@ -11,9 +11,6 @@
 #include <irq_func.h>
 #include <asm/processor.h>
 #include <watchdog.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
 #include <asm/ptrace.h>
 
 #ifndef CONFIG_MPC83XX_TIMER
@@ -83,9 +80,6 @@ void timer_interrupt(struct pt_regs *regs)
 		schedule();
 #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
 
-#ifdef CONFIG_LED_STATUS
-	status_led_tick(timestamp);
-#endif /* CONFIG_LED_STATUS */
 }
 
 ulong get_timer (ulong base)
Signature · 1 line
2.43.0
#18 lore raw

PATCH 17/27 eb_cpu5282: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 board/BuS/eb_cpu5282/eb_cpu5282.c | 20 --------------------
 include/configs/eb_cpu5282.h      |  6 ------
 2 files changed, 26 deletions(-)
board/BuS/eb_cpu5282/eb_cpu5282.c +0 -20
index c254da62bf4..cdd862c57d2 100644
@@ -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 */
include/configs/eb_cpu5282.h +0 -6
index 26e4ade34ee..a4d1338c8fa 100644
@@ -14,12 +14,6 @@
 
 #define CFG_SYS_UART_PORT		(0)
 
-/*----------------------------------------------------------------------*
- * Options								*
- *----------------------------------------------------------------------*/
-
-#define STATUS_LED_ACTIVE		0
-
 /*----------------------------------------------------------------------*
  * Configuration for environment					*
  * Environment is in the second sector of the first 256k of flash	*
Signature · 1 line
2.43.0
#19 lore raw

PATCH 18/27 igep00x0: Drop unused status_led.h header file

In reply to Simon Glass

This header file is not used, so drop it.

---

 board/isee/igep00x0/igep00x0.c | 1 -
 1 file changed, 1 deletion(-)
board/isee/igep00x0/igep00x0.c +0 -1
index a35a7cd3b1f..35bb8c55806 100644
@@ -8,7 +8,6 @@
 #include <init.h>
 #include <malloc.h>
 #include <net.h>
-#include <status_led.h>
 #include <dm.h>
 #include <ns16550.h>
 #include <twl4030.h>
Signature · 1 line
2.43.0
#21 lore raw

PATCH 19/27 mx23_olinuxino: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
 1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -7
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
 #include <linux/delay.h>
 
 DECLARE_GLOBAL_DATA_PTR;
@@ -61,9 +58,5 @@ int board_init(void)
 	/* Adress of boot parameters */
 	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-	status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif
-
 	return 0;
 }
Signature · 1 line
2.43.0
#22 lore raw

Re: [PATCH 19/27] mx23_olinuxino: Drop status-LED code

Quoted 23 lines · Simon Glass

This is not used anymore, so drop it.

---

  board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
  1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
  #include <asm/arch/imx-regs.h>
  #include <asm/arch/clock.h>
  #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
  #include <linux/delay.h>
 
  DECLARE_GLOBAL_DATA_PTR;

board/olimex/mx23_olinuxino/mx23_olinuxino.c int board_init(void) · line 66

Quoted 6 lines
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
@@ -61,9 +58,5 @@ int board_init(void)
  	/* Adress of boot parameters */
  	gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-	status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif

Why not define the GPIO LED in DT, it might even already be defined there.

#23 lore raw

Re: [PATCH 19/27] mx23_olinuxino: Drop status-LED code

Hi Marek,

Quoted 28 lines · Marek Vasut
Quoted 26 lines · Simon Glass

This is not used anymore, so drop it.

---

  board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
  1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
  #include <asm/arch/imx-regs.h>
  #include <asm/arch/clock.h>
  #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
  #include <linux/delay.h>
 
  DECLARE_GLOBAL_DATA_PTR;
@@ -61,9 +58,5 @@ int board_init(void)
      /* Adress of boot parameters */
      gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
Quoted 4 lines

board/olimex/mx23_olinuxino/mx23_olinuxino.c int board_init(void) · line 66

Quoted 3 lines
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-     status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif

Why not define the GPIO LED in DT, it might even already be defined there.

Yes I see it in the DT for quite a few boards, so that's what we should use.

Regards,
Simon

#24 lore raw

Re: [PATCH 19/27] mx23_olinuxino: Drop status-LED code

Quoted 1 line · Simon Glass

Hi Marek,

Hello Simon,

Quoted 29 lines · Marek Vasut
Quoted 28 lines · Simon Glass
Quoted 26 lines

This is not used anymore, so drop it.

---

   board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
   1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
   #include <asm/arch/imx-regs.h>
   #include <asm/arch/clock.h>
   #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
   #include <linux/delay.h>
 
   DECLARE_GLOBAL_DATA_PTR;
@@ -61,9 +58,5 @@ int board_init(void)
       /* Adress of boot parameters */
       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
Quoted 6 lines
Quoted 4 lines

board/olimex/mx23_olinuxino/mx23_olinuxino.c int board_init(void) · line 66

Quoted 3 lines
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-     status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif

Why not define the GPIO LED in DT, it might even already be defined there.

Yes I see it in the DT for quite a few boards, so that's what we should use.

Since LED uclass already uses well established DM_FLAG_PROBE_AFTER_BIND flag, the update here should be only a matter of enabling DM LED and GPIO LED driver.

#25 lore raw

Re: [PATCH 19/27] mx23_olinuxino: Drop status-LED code

Hi Marek,

Quoted 40 lines · Marek Vasut
Quoted 1 line · Simon Glass

Hi Marek,

Hello Simon,

Quoted 34 lines · Marek Vasut
Quoted 32 lines · Simon Glass
Quoted 23 lines

This is not used anymore, so drop it.

---

   board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
   1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
   #include <asm/arch/imx-regs.h>
   #include <asm/arch/clock.h>
   #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
   #include <linux/delay.h>
 
   DECLARE_GLOBAL_DATA_PTR;

board/olimex/mx23_olinuxino/mx23_olinuxino.c int board_init(void) · line 66

Quoted 6 lines
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
@@ -61,9 +58,5 @@ int board_init(void)
       /* Adress of boot parameters */
       gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-     status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif

Why not define the GPIO LED in DT, it might even already be defined there.

Quoted 4 lines
Quoted 1 line

Yes I see it in the DT for quite a few boards, so that's what we should use.

Since LED uclass already uses well established DM_FLAG_PROBE_AFTER_BIND flag, the update here should be only a matter of enabling DM LED and GPIO LED driver.

Yes, fair enough, but I hope you are not suggesting I try and do it?

I'm OK with that flag with LEDs. It is regulators where I get nervous.

Regards,
Simon

#26 lore raw

Re: [PATCH 19/27] mx23_olinuxino: Drop status-LED code

Quoted 1 line · Simon Glass

Hi Marek,

Hi,

Quoted 41 lines · Marek Vasut
Quoted 40 lines · Simon Glass
Quoted 1 line

Hi Marek,

Hello Simon,

Quoted 34 lines · Marek Vasut
Quoted 32 lines · Simon Glass
Quoted 23 lines

This is not used anymore, so drop it.

---

    board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 -------
    1 file changed, 7 deletions(-)
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
index b2bb6678c23..78136c1620a 100644
@@ -13,9 +13,6 @@
    #include <asm/arch/imx-regs.h>
    #include <asm/arch/clock.h>
    #include <asm/arch/sys_proto.h>
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
    #include <linux/delay.h>
 
    DECLARE_GLOBAL_DATA_PTR;

board/olimex/mx23_olinuxino/mx23_olinuxino.c int board_init(void) · line 66

Quoted 6 lines
board/olimex/mx23_olinuxino/mx23_olinuxino.c +0 -3
@@ -61,9 +58,5 @@ int board_init(void)
        /* Adress of boot parameters */
        gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
 
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-     status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_STATE);
-#endif

Why not define the GPIO LED in DT, it might even already be defined there.

Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Yes I see it in the DT for quite a few boards, so that's what we should use.

Since LED uclass already uses well established DM_FLAG_PROBE_AFTER_BIND flag, the update here should be only a matter of enabling DM LED and GPIO LED driver.

Yes, fair enough, but I hope you are not suggesting I try and do it?

Turn on the Kconfig options , that's all I am asking .

Quoted 1 line

I'm OK with that flag with LEDs. It is regulators where I get nervous.

OK

#27 lore raw

PATCH 20/27 vining_fpga: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 board/softing/vining_fpga/socfpga.c | 4 ----
 1 file changed, 4 deletions(-)
board/softing/vining_fpga/socfpga.c +0 -4
index 2483fbcf263..50f2ca7ec61 100644
@@ -8,7 +8,6 @@
 #include <env.h>
 #include <init.h>
 #include <net.h>
-#include <status_led.h>
 #include <asm/arch/reset_manager.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
@@ -26,9 +25,6 @@ int board_late_init(void)
 	const unsigned int usb_nrst_gpio = 35;
 	int ret;
 
-	status_led_set(1, CONFIG_LED_STATUS_ON);
-	status_led_set(2, CONFIG_LED_STATUS_ON);
-
 	/* Address of boot parameters for ATAG (if ATAG is used) */
 	gd->bd->bi_boot_params = CFG_SYS_SDRAM_BASE + 0x100;
 
Signature · 1 line
2.43.0
#28 lore raw

PATCH 21/27 sunxi: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 board/sunxi/board.c | 6 ------
 1 file changed, 6 deletions(-)
board/sunxi/board.c +0 -6
index 961cdcde74d..090a619386d 100644
@@ -49,7 +49,6 @@
 #include <spl.h>
 #include <sy8106a.h>
 #include <asm/setup.h>
-#include <status_led.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -550,11 +549,6 @@ void sunxi_board_init(void)
 {
 	int power_failed = 0;
 
-#ifdef CONFIG_LED_STATUS
-	if (IS_ENABLED(CONFIG_SPL_DRIVERS_MISC))
-		status_led_init();
-#endif
-
 #ifdef CONFIG_SY8106A_POWER
 	power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT);
 #endif
Signature · 1 line
2.43.0
#29 lore raw

PATCH 22/27 common: Drop status-LED code in board_r

In reply to Simon Glass

This is not used anymore, so drop it.

---

 common/board_r.c | 16 ----------------
 1 file changed, 16 deletions(-)
common/board_r.c +0 -16
index 4faaa202421..b207c04e4d4 100644
@@ -51,7 +51,6 @@
 #include <pvblock.h>
 #include <scsi.h>
 #include <serial.h>
-#include <status_led.h>
 #include <stdio_dev.h>
 #include <timer.h>
 #include <trace.h>
@@ -460,18 +459,6 @@ static int initr_malloc_bootparams(void)
 }
 #endif
 
-#if defined(CONFIG_LED_STATUS)
-static int initr_status_led(void)
-{
-#if defined(CONFIG_LED_STATUS_BOOT)
-	status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_BLINKING);
-#else
-	status_led_init();
-#endif
-	return 0;
-}
-#endif
-
 #ifdef CONFIG_CMD_NET
 static int initr_net(void)
 {
@@ -724,9 +711,6 @@ static init_fnc_t init_sequence_r[] = {
 	interrupt_init,
 #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_M68K)
 	timer_init,		/* initialize timer */
-#endif
-#if defined(CONFIG_LED_STATUS)
-	initr_status_led,
 #endif
 	/* PPC has a udelay(20) here dating from 2002. Why? */
 #ifdef CONFIG_BOARD_LATE_INIT
Signature · 1 line
2.43.0
#30 lore raw

PATCH 23/27 image: Drop unused status_led.h header file

In reply to Simon Glass

This header file is not used, so drop it.

---

 boot/image.c | 4 ----
 1 file changed, 4 deletions(-)
boot/image.c +0 -4
index abac254e026..7bed8ba4b1f 100644
@@ -15,10 +15,6 @@
 #include <malloc.h>
 #include <u-boot/crc.h>
 
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
-#include <status_led.h>
-#endif
-
 #if CONFIG_IS_ENABLED(FIT) || CONFIG_IS_ENABLED(OF_LIBFDT)
 #include <linux/libfdt.h>
 #include <fdt_support.h>
Signature · 1 line
2.43.0
#31 lore raw

PATCH 24/27 ide: Drop unused status_led.h header file

In reply to Simon Glass

This header file is not used, so drop it.

---

 cmd/ide.c | 4 ----
 1 file changed, 4 deletions(-)
cmd/ide.c +0 -4
index 036489fda97..be3078ae88b 100644
@@ -22,10 +22,6 @@
 #include <ide.h>
 #include <ata.h>
 
-#ifdef CONFIG_LED_STATUS
-# include <status_led.h>
-#endif
-
 /* Current I/O Device	*/
 static int curr_device;
 
Signature · 1 line
2.43.0
#32 lore raw

PATCH 25/27 mpc83xx: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 drivers/timer/mpc83xx_timer.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/timer/mpc83xx_timer.c +0 -5
index 9da74479aaa..aefc18898e9 100644
@@ -9,7 +9,6 @@
 #include <dm.h>
 #include <irq_func.h>
 #include <log.h>
-#include <status_led.h>
 #include <sysinfo.h>
 #include <time.h>
 #include <timer.h>
@@ -178,10 +177,6 @@ void timer_interrupt(struct pt_regs *regs)
 	if (CFG_SYS_WATCHDOG_FREQ && (priv->timestamp % (CFG_SYS_WATCHDOG_FREQ)) == 0)
 		schedule();
 #endif    /* CONFIG_WATCHDOG || CONFIG_HW_WATCHDOG */
-
-#ifdef CONFIG_LED_STATUS
-	status_led_tick(priv->timestamp);
-#endif /* CONFIG_LED_STATUS */
 }
 
 void wait_ticks(ulong ticks)
Signature · 1 line
2.43.0
#33 lore raw

PATCH 26/27 net: Drop status-LED code

In reply to Simon Glass

This is not used anymore, so drop it.

---

 net/bootp.c |  7 -------
 net/net.c   | 33 ---------------------------------
 2 files changed, 40 deletions(-)
net/bootp.c +0 -7
index 512ab2ed7c8..8a7806f3efc 100644
@@ -19,9 +19,6 @@
 #include <linux/delay.h>
 #include <net/tftp.h>
 #include "bootp.h"
-#ifdef CONFIG_LED_STATUS
-#include <status_led.h>
-#endif
 #ifdef CONFIG_BOOTP_RANDOM_DELAY
 #include "net_rand.h"
 #endif
@@ -370,10 +367,6 @@ static void bootp_handler(uchar *pkt, unsigned dest, struct in_addr sip,
 	/*
 	 *	Got a good BOOTP reply.	 Copy the data into our variables.
 	 */
-#if defined(CONFIG_LED_STATUS) && defined(CONFIG_LED_STATUS_BOOT_ENABLE)
-	status_led_set(CONFIG_LED_STATUS_BOOT, CONFIG_LED_STATUS_OFF);
-#endif
-
 	store_net_params(bp);		/* Store net parameters from reply */
 
 	/* Retrieve extended information (we must parse the vendor area) */
net/net.c +0 -33
index 1e0b7c85624..fef214f2ebe 100644
@@ -99,10 +99,6 @@
 #include <net/pcap.h>
 #endif
 #include <net/udp.h>
-#if defined(CONFIG_LED_STATUS)
-#include <miiphy.h>
-#include <status_led.h>
-#endif
 #include <watchdog.h>
 #include <linux/compiler.h>
 #include <test/test.h>
@@ -613,19 +609,6 @@ restart:
 		break;
 	}
 
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if	defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)	&& \
-	defined(CONFIG_LED_STATUS)			&& \
-	defined(CONFIG_LED_STATUS_RED)
-	/*
-	 * Echo the inverted link state to the fault LED.
-	 */
-	if (miiphy_link(eth_get_dev()->name, CONFIG_SYS_FAULT_MII_ADDR))
-		status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_OFF);
-	else
-		status_led_set(CONFIG_LED_STATUS_RED, CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
 #ifdef CONFIG_USB_KEYBOARD
 	net_busy_flag = 1;
 #endif
@@ -680,22 +663,6 @@ restart:
 		    ((get_timer(0) - time_start) > time_delta)) {
 			thand_f *x;
 
-#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-#if	defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)	&& \
-	defined(CONFIG_LED_STATUS)			&& \
-	defined(CONFIG_LED_STATUS_RED)
-			/*
-			 * Echo the inverted link state to the fault LED.
-			 */
-			if (miiphy_link(eth_get_dev()->name,
-					CONFIG_SYS_FAULT_MII_ADDR))
-				status_led_set(CONFIG_LED_STATUS_RED,
-					       CONFIG_LED_STATUS_OFF);
-			else
-				status_led_set(CONFIG_LED_STATUS_RED,
-					       CONFIG_LED_STATUS_ON);
-#endif /* CONFIG_SYS_FAULT_ECHO_LINK_DOWN, ... */
-#endif /* CONFIG_MII, ... */
 			debug_cond(DEBUG_INT_STATE, "--- net_loop timeout\n");
 			x = time_handler;
 			time_handler = (thand_f *)0;
Signature · 1 line
2.43.0
#34 lore raw

PATCH 27/27 led: Drop status_led header file

In reply to Simon Glass

This is not needed anymore. Drop it.

---

 include/status_led.h | 91 --------------------------------------------
 1 file changed, 91 deletions(-)
 delete mode 100644 include/status_led.h
include/status_led.h deleted +0 -91
deleted file mode 100644
index 3d118af0d8b..00000000000
@@ -1,91 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ */
-/*
- * (C) Copyright 2000-2004
- * Wolfgang Denk, DENX Software Engineering, [email protected].
- */
-
-/*
- * The purpose of this code is to signal the operational status of a
- * target which usually boots over the network; while running in
- * PCBoot, a status LED is blinking. As soon as a valid BOOTP reply
- * message has been received, the LED is turned off. The Linux
- * kernel, once it is running, will start blinking the LED again,
- * with another frequency.
- */
-
-#ifndef _STATUS_LED_H_
-#define	_STATUS_LED_H_
-
-#ifdef CONFIG_LED_STATUS
-
-#define LED_STATUS_PERIOD	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ)
-#ifdef CONFIG_LED_STATUS1
-#define LED_STATUS_PERIOD1	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ1)
-#endif /* CONFIG_LED_STATUS1 */
-#ifdef CONFIG_LED_STATUS2
-#define LED_STATUS_PERIOD2	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ2)
-#endif /* CONFIG_LED_STATUS2 */
-#ifdef CONFIG_LED_STATUS3
-#define LED_STATUS_PERIOD3	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ3)
-#endif /* CONFIG_LED_STATUS3 */
-#ifdef CONFIG_LED_STATUS4
-#define LED_STATUS_PERIOD4	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ4)
-#endif /* CONFIG_LED_STATUS4 */
-#ifdef CONFIG_LED_STATUS5
-#define LED_STATUS_PERIOD5	(CONFIG_SYS_HZ / CONFIG_LED_STATUS_FREQ5)
-#endif /* CONFIG_LED_STATUS5 */
-
-void status_led_init(void);
-void status_led_tick(unsigned long timestamp);
-void status_led_set(int led, int state);
-
-/*****  MVS v1  **********************************************************/
-#if (defined(CONFIG_MVS) && CONFIG_MVS < 2)
-# define STATUS_LED_PAR		im_ioport.iop_pdpar
-# define STATUS_LED_DIR		im_ioport.iop_pddir
-# undef  STATUS_LED_ODR
-# define STATUS_LED_DAT		im_ioport.iop_pddat
-
-# define STATUS_LED_ACTIVE	1		/* LED on for bit == 1	*/
-
-/*****  Someone else defines these  *************************************/
-#elif defined(STATUS_LED_PAR)
-  /*
-   * ADVICE: Define in your board configuration file rather than
-   * filling this file up with lots of custom board stuff.
-   */
-#else
-# error Status LED configuration missing
-#endif
-/************************************************************************/
-
-#include <asm/status_led.h>
-
-#endif	/* CONFIG_LED_STATUS	*/
-
-/*
- * Coloured LEDs API
- */
-#ifndef	__ASSEMBLY__
-void coloured_LED_init(void);
-void red_led_on(void);
-void red_led_off(void);
-void green_led_on(void);
-void green_led_off(void);
-void yellow_led_on(void);
-void yellow_led_off(void);
-void blue_led_on(void);
-void blue_led_off(void);
-#else
-	.extern LED_init
-	.extern red_led_on
-	.extern red_led_off
-	.extern yellow_led_on
-	.extern yellow_led_off
-	.extern green_led_on
-	.extern green_led_off
-	.extern blue_led_on
-	.extern blue_led_off
-#endif
-
-#endif	/* _STATUS_LED_H_	*/
Signature · 1 line
2.43.0