From patchwork Sun Jan 27 22:08:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,2/2] mx23_olinuxino: Add support for status LED Date: Sun, 27 Jan 2013 12:08:48 -0000 From: Otavio Salvador X-Patchwork-Id: 216068 Message-Id: <1359324528-19052-2-git-send-email-otavio@ossystems.com.br> To: u-boot@lists.denx.de Cc: Fabio Estevam , Marek Vasut , Otavio Salvador This allow user to know if the bootloader is running, even without a serial console. Signed-off-by: Otavio Salvador --- Changes in v2: - Remove MUX setting - not need board/olimex/mx23_olinuxino/mx23_olinuxino.c | 7 +++++++ include/configs/mx23_olinuxino.h | 12 ++++++++++++ 2 files changed, 19 insertions(+) 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 #include #include +#ifdef CONFIG_STATUS_LED +#include +#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/include/configs/mx23_olinuxino.h b/include/configs/mx23_olinuxino.h index 4658aea..c57bb67 100644 --- a/include/configs/mx23_olinuxino.h +++ b/include/configs/mx23_olinuxino.h @@ -56,6 +56,7 @@ #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT #define CONFIG_CMD_GPIO +#define CONFIG_CMD_LED #define CONFIG_CMD_MMC /* @@ -112,6 +113,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 0x30a +#define STATUS_LED_STATE STATUS_LED_ON +#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) + +/* * MMC Driver */ #ifdef CONFIG_CMD_MMC