]> git.sur5r.net Git - u-boot/blobdiff - drivers/misc/status_led.c
common: Pass the boot device into spl_boot_mode()
[u-boot] / drivers / misc / status_led.c
index ddb6c22e89030a935ba28b346045aef351ff54de..31e88319d1515ceb9de50e9e7e749215265a5f7f 100644 (file)
@@ -2,23 +2,7 @@
  * (C) Copyright 2000-2003
  * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -35,8 +19,6 @@
 
 /* ------------------------------------------------------------------------- */
 
-#ifdef CONFIG_STATUS_LED
-
 typedef struct {
        led_id_t mask;
        int state;
@@ -71,13 +53,27 @@ led_dev_t led_dev[] = {
        0,
     },
 #endif
+#if defined(STATUS_LED_BIT4)
+    {  STATUS_LED_BIT4,
+       STATUS_LED_STATE4,
+       STATUS_LED_PERIOD4,
+       0,
+    },
+#endif
+#if defined(STATUS_LED_BIT5)
+    {  STATUS_LED_BIT5,
+       STATUS_LED_STATE5,
+       STATUS_LED_PERIOD5,
+       0,
+    },
+#endif
 };
 
 #define MAX_LED_DEV    (sizeof(led_dev)/sizeof(led_dev_t))
 
 static int status_led_init_done = 0;
 
-static void status_led_init (void)
+void status_led_init(void)
 {
        led_dev_t *ld;
        int i;
@@ -127,5 +123,3 @@ void status_led_set (int led, int state)
        }
        __led_set (ld->mask, state);
 }
-
-#endif /* CONFIG_STATUS_LED */