summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2013-02-23 02:43:09 +0000
committerStefano Babic <sbabic@denx.de>2013-03-07 17:22:57 +0100
commit36c7c9250d7c4717808a637da74e59a29a235848 (patch)
tree48ab877fdb0c314ece6a20ff73de2760eecc6ecb
parenteb2996024b1592f77454302213d5bf0659684c7b (diff)
downloadu-boot-imx-36c7c9250d7c4717808a637da74e59a29a235848.zip
u-boot-imx-36c7c9250d7c4717808a637da74e59a29a235848.tar.gz
u-boot-imx-36c7c9250d7c4717808a637da74e59a29a235848.tar.bz2
mx23_olinuxino: Add support for status LED
This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--board/olimex/mx23_olinuxino/mx23_olinuxino.c7
-rw-r--r--board/olimex/mx23_olinuxino/spl_boot.c4
-rw-r--r--include/configs/mx23_olinuxino.h14
3 files changed, 25 insertions, 0 deletions
diff --git a/board/olimex/mx23_olinuxino/mx23_olinuxino.c b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
index 6a6053b..2501417 100644
--- a/board/olimex/mx23_olinuxino/mx23_olinuxino.c
+++ b/board/olimex/mx23_olinuxino/mx23_olinuxino.c
@@ -28,6 +28,9 @@
#include <asm/arch/imx-regs.h>
#include <asm/arch/clock.h>
#include <asm/arch/sys_proto.h>
+#ifdef CONFIG_STATUS_LED
+#include <status_led.h>
+#endif
DECLARE_GLOBAL_DATA_PTR;
@@ -67,5 +70,9 @@ int board_init(void)
/* Adress of boot parameters */
gd->bd->bi_boot_params = PHYS_SDRAM_1 + 0x100;
+#if defined(CONFIG_STATUS_LED) && defined(STATUS_LED_BOOT)
+ status_led_set(STATUS_LED_BOOT, STATUS_LED_STATE);
+#endif
+
return 0;
}
diff --git a/board/olimex/mx23_olinuxino/spl_boot.c b/board/olimex/mx23_olinuxino/spl_boot.c
index 7def8bc..3bbf5ad 100644
--- a/board/olimex/mx23_olinuxino/spl_boot.c
+++ b/board/olimex/mx23_olinuxino/spl_boot.c
@@ -84,6 +84,10 @@ const iomux_cfg_t iomux_setup[] = {
MX23_PAD_EMI_RASN__EMI_RASN | MUX_CONFIG_EMI,
MX23_PAD_EMI_WEN__EMI_WEN | MUX_CONFIG_EMI,
+ /* Green LED */
+ MX23_PAD_SSP1_DETECT__GPIO_2_1 |
+ (MXS_PAD_3V3 | MXS_PAD_4MA | MXS_PAD_NOPULL),
+
/* MMC 0 */
MX23_PAD_SSP1_CMD__SSP1_CMD | MUX_CONFIG_SSP,
MX23_PAD_SSP1_DATA0__SSP1_DATA0 | MUX_CONFIG_SSP,
diff --git a/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h
index 7983c5d..d019944 100644
--- a/include/configs/mx23_olinuxino.h
+++ b/include/configs/mx23_olinuxino.h
@@ -19,6 +19,8 @@
#ifndef __MX23_OLINUXINO_CONFIG_H__
#define __MX23_OLINUXINO_CONFIG_H__
+#include <asm/arch/iomux-mx23.h>
+
/*
* SoC configurations
*/
@@ -56,6 +58,7 @@
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
#define CONFIG_CMD_GPIO
+#define CONFIG_CMD_LED
#define CONFIG_CMD_MMC
/*
@@ -112,6 +115,17 @@
#define CONFIG_BAUDRATE 115200 /* Default baud rate */
/*
+ * Status LED
+ */
+#define CONFIG_STATUS_LED
+#define CONFIG_GPIO_LED
+#define CONFIG_BOARD_SPECIFIC_LED
+#define STATUS_LED_BOOT 0
+#define STATUS_LED_BIT MX23_PAD_SSP1_DETECT__GPIO_2_1
+#define STATUS_LED_STATE STATUS_LED_ON
+#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2)
+
+/*
* MMC Driver
*/
#ifdef CONFIG_CMD_MMC