From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Tom Rini" <trini@konsulko.com>, "Simon Glass" <sjg@chromium.org>,
"Caleb Connolly" <caleb.connolly@linaro.org>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Ilias Apalodimas" <ilias.apalodimas@linaro.org>,
"Jonas Karlman" <jonas@kwiboo.se>,
"Marek Behún" <kabel@kernel.org>,
"Wan Yee Lau" <wan.yee.lau@intel.com>
Subject: [PATCH 14/27] misc: status_led: Delete driver
Date: Thu, 26 Sep 2024 22:44:34 +0200 [thread overview]
Message-ID: <20240926204455.963584-15-sjg@chromium.org> (raw)
In-Reply-To: <20240926204455.963584-1-sjg@chromium.org>
This driver is not used anymore. Drop it.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
drivers/misc/Makefile | 1 -
drivers/misc/status_led.c | 124 --------------------------------------
2 files changed, 125 deletions(-)
delete mode 100644 drivers/misc/status_led.c
diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile
index 03d87ef8a0e..cf6ece919bc 100644
--- a/drivers/misc/Makefile
+++ b/drivers/misc/Makefile
@@ -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
diff --git a/drivers/misc/status_led.c b/drivers/misc/status_led.c
deleted file mode 100644
index 3b1baa4f840..00000000000
--- a/drivers/misc/status_led.c
+++ /dev/null
@@ -1,124 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2000-2003
- * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- */
-
-#include <status_led.h>
-#include <linux/types.h>
-
-/*
- * The purpose of this code is to signal the operational status of a
- * target which usually boots over the network; while running in
- * U-Boot, 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.
- */
-
-/* ------------------------------------------------------------------------- */
-
-typedef struct {
- led_id_t mask;
- int state;
- int period;
- int cnt;
-} led_dev_t;
-
-led_dev_t led_dev[] = {
- { CONFIG_LED_STATUS_BIT,
- CONFIG_LED_STATUS_STATE,
- LED_STATUS_PERIOD,
- 0,
- },
-#if defined(CONFIG_LED_STATUS1)
- { CONFIG_LED_STATUS_BIT1,
- CONFIG_LED_STATUS_STATE1,
- LED_STATUS_PERIOD1,
- 0,
- },
-#endif
-#if defined(CONFIG_LED_STATUS2)
- { CONFIG_LED_STATUS_BIT2,
- CONFIG_LED_STATUS_STATE2,
- LED_STATUS_PERIOD2,
- 0,
- },
-#endif
-#if defined(CONFIG_LED_STATUS3)
- { CONFIG_LED_STATUS_BIT3,
- CONFIG_LED_STATUS_STATE3,
- LED_STATUS_PERIOD3,
- 0,
- },
-#endif
-#if defined(CONFIG_LED_STATUS4)
- { CONFIG_LED_STATUS_BIT4,
- CONFIG_LED_STATUS_STATE4,
- LED_STATUS_PERIOD4,
- 0,
- },
-#endif
-#if defined(CONFIG_LED_STATUS5)
- { CONFIG_LED_STATUS_BIT5,
- CONFIG_LED_STATUS_STATE5,
- LED_STATUS_PERIOD5,
- 0,
- },
-#endif
-};
-
-#define MAX_LED_DEV (sizeof(led_dev)/sizeof(led_dev_t))
-
-static int status_led_init_done = 0;
-
-void status_led_init(void)
-{
- led_dev_t *ld;
- int i;
-
- for (i = 0, ld = led_dev; i < MAX_LED_DEV; i++, ld++)
- __led_init (ld->mask, ld->state);
- status_led_init_done = 1;
-}
-
-void status_led_tick(ulong timestamp)
-{
- led_dev_t *ld;
- int i;
-
- if (!status_led_init_done)
- status_led_init();
-
- for (i = 0, ld = led_dev; i < MAX_LED_DEV; i++, ld++) {
-
- if (ld->state != CONFIG_LED_STATUS_BLINKING)
- continue;
-
- if (++ld->cnt >= ld->period) {
- __led_toggle (ld->mask);
- ld->cnt -= ld->period;
- }
-
- }
-}
-
-void status_led_set(int led, int state)
-{
- led_dev_t *ld;
-
- if (led < 0 || led >= MAX_LED_DEV)
- return;
-
- if (!status_led_init_done)
- status_led_init();
-
- ld = &led_dev[led];
-
- ld->state = state;
- if (state == CONFIG_LED_STATUS_BLINKING) {
- ld->cnt = 0; /* always start with full period */
- state = CONFIG_LED_STATUS_ON; /* always start with LED _ON_ */
- }
- __led_set (ld->mask, state);
-}
--
2.43.0
next prev parent reply other threads:[~2024-09-26 20:51 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-26 20:44 [PATCH 00/27] led: Remove old status-LED code Simon Glass
2024-09-26 20:44 ` [PATCH 01/27] led: Drop LED_STATUS_BOARD_SPECIFIC Simon Glass
2024-09-26 20:44 ` [PATCH 02/27] arm: Drop old LED support Simon Glass
2024-09-26 20:44 ` [PATCH 03/27] common: doc: " Simon Glass
2024-09-26 20:44 ` [PATCH 04/27] st: stm32f429: Drop old LED code Simon Glass
2024-09-26 20:44 ` [PATCH 05/27] led: Make the LED config common Simon Glass
2024-09-26 20:44 ` [PATCH 06/27] eb_cpu5282: Drop STATUS_LED Simon Glass
2024-09-26 20:44 ` [PATCH 07/27] mx23_olinuxino: " Simon Glass
2024-09-26 20:44 ` [PATCH 08/27] pinephone: " Simon Glass
2024-09-26 20:44 ` [PATCH 09/27] socfpga_vining_fpga: " Simon Glass
2024-09-26 20:44 ` [PATCH 10/27] led: Drop LED_STATUS from Kconfig Simon Glass
2024-09-26 20:44 ` [PATCH 11/27] led: Drop the legacy LED command Simon Glass
2024-09-26 20:44 ` [PATCH 12/27] misc: Drop gpio_led driver Simon Glass
2024-09-26 20:44 ` [PATCH 13/27] pca9551_led: Delete driver Simon Glass
2024-09-26 20:44 ` Simon Glass [this message]
2024-09-26 20:44 ` [PATCH 15/27] m68k: Drop unused status_led.h header file Simon Glass
2024-10-01 7:21 ` Acked Angelo Dureghello
2024-09-26 20:44 ` [PATCH 16/27] powerpc: Drop status-LED code Simon Glass
2024-09-26 20:44 ` [PATCH 17/27] eb_cpu5282: " Simon Glass
2024-09-26 20:44 ` [PATCH 18/27] igep00x0: Drop unused status_led.h header file Simon Glass
2024-09-26 21:30 ` Javier Martinez Canillas
2024-09-26 20:44 ` [PATCH 19/27] mx23_olinuxino: Drop status-LED code Simon Glass
2024-09-26 21:39 ` Marek Vasut
2024-09-26 22:10 ` Simon Glass
2024-09-26 22:19 ` Marek Vasut
2024-09-27 10:43 ` Simon Glass
2024-09-27 10:51 ` Marek Vasut
2024-09-26 20:44 ` [PATCH 20/27] vining_fpga: " Simon Glass
2024-09-26 20:44 ` [PATCH 21/27] sunxi: " Simon Glass
2024-09-26 20:44 ` [PATCH 22/27] common: Drop status-LED code in board_r Simon Glass
2024-09-26 20:44 ` [PATCH 23/27] image: Drop unused status_led.h header file Simon Glass
2024-09-26 20:44 ` [PATCH 24/27] ide: " Simon Glass
2024-09-26 20:44 ` [PATCH 25/27] mpc83xx: Drop status-LED code Simon Glass
2024-09-26 20:44 ` [PATCH 26/27] net: " Simon Glass
2024-09-26 20:44 ` [PATCH 27/27] led: Drop status_led header file Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240926204455.963584-15-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=caleb.connolly@linaro.org \
--cc=ilias.apalodimas@linaro.org \
--cc=jonas@kwiboo.se \
--cc=kabel@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=wan.yee.lau@intel.com \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox