]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
OMAP3: igep00x0: add boot status GPIO LED
authorJavier Martinez Canillas <javier@dowhile0.org>
Thu, 27 Dec 2012 03:36:01 +0000 (03:36 +0000)
committerTom Rini <trini@ti.com>
Thu, 7 Feb 2013 15:36:25 +0000 (10:36 -0500)
This patch adds an GPIO LED boot status for IGEP boards.

The GPIO LED used is the red LED0 while the Linux kernel
uses the green LED0 as the boot status.

By using different GPIO LEDs, the user can know in which
step of the boot process the board currently is.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Acked-by: Igor Grinberg <grinberg@compulab.co.il>
board/isee/igep00x0/igep00x0.c
board/isee/igep00x0/igep00x0.h
include/configs/igep00x0.h

index 358904918a481143f0ad0313acc2939476b115c6..49fcf348930e95a085d3b682eaa537bf94256fe5 100644 (file)
@@ -60,6 +60,19 @@ int board_init(void)
        return 0;
 }
 
+#if defined(CONFIG_SHOW_BOOT_PROGRESS) && !defined(CONFIG_SPL_BUILD)
+void show_boot_progress(int val)
+{
+       if (val < 0) {
+               /* something went wrong */
+               return;
+       }
+
+       if (!gpio_request(IGEP00X0_GPIO_LED, ""))
+               gpio_direction_output(IGEP00X0_GPIO_LED, 1);
+}
+#endif
+
 #ifdef CONFIG_SPL_BUILD
 /*
  * Routine: omap_rev_string
index 6d538db9485d08b50ef9a21133a3bf2f5a1e8fe3..3a8433517d37d3fcdce84a6ff74a90c6259aa923 100644 (file)
 #ifndef _IGEP00X0_H_
 #define _IGEP00X0_H_
 
+#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
+#define IGEP00X0_GPIO_LED 27
+#endif
+
+#if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0030)
+#define IGEP00X0_GPIO_LED 16
+#endif
+
 const omap3_sysinfo sysinfo = {
        DDR_STACKED,
 #if (CONFIG_MACH_TYPE == MACH_TYPE_IGEP0020)
index c590614d5ba0d96d06150d5b3c48fc8e56ffc285..f1d6c6a193e5f73914f41287aa089ba3b3b6b664 100644 (file)
@@ -85,6 +85,9 @@
 #define CONFIG_OMAP_HSMMC              1
 #define CONFIG_DOS_PARTITION           1
 
+/* define to enable boot progress via leds */
+#define CONFIG_SHOW_BOOT_PROGRESS
+
 /* USB */
 #define CONFIG_MUSB_UDC                        1
 #define CONFIG_USB_OMAP3               1