diff options
author | Arnaud Ferraris <arnaud.ferraris@collabora.com> | 2021-09-08 21:14:19 +0200 |
---|---|---|
committer | Andre Przywara <andre.przywara@arm.com> | 2021-10-11 10:46:44 +0100 |
commit | 8f872bb37dc216785822b77d4421dc7f782e236c (patch) | |
tree | 08f28b926f09399f3e64ed4709005f260b4ff61a | |
parent | 14c8c631e986d350ce468ae5d627f547e5a4e1aa (diff) | |
download | u-boot-8f872bb37dc216785822b77d4421dc7f782e236c.zip u-boot-8f872bb37dc216785822b77d4421dc7f782e236c.tar.gz u-boot-8f872bb37dc216785822b77d4421dc7f782e236c.tar.bz2 |
board: sunxi: enable status LED early
For some systems, such as the PinePhone, there is no way for the end
user to make sure the system is indeed booting before the boot script is
executed, which takes several seconds. Therefore, it can be useful to
provide early visual feedback as soon as possible.
In order achieve this goal, this patch initializes the status LED (if
configured) in the SPL.
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Signed-off-by: Andre Przywara <andre.przywara@arm.com>
-rw-r--r-- | board/sunxi/board.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 418dc0c..6ba7bf5 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -46,6 +46,7 @@ #include <spl.h> #include <sy8106a.h> #include <asm/setup.h> +#include <status_led.h> #if defined(CONFIG_VIDEO_LCD_PANEL_I2C) /* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */ @@ -629,6 +630,11 @@ void sunxi_board_init(void) { int power_failed = 0; +#ifdef CONFIG_LED_STATUS + if (IS_ENABLED(CONFIG_SPL_DRIVERS_MISC)) + status_led_init(); +#endif + #ifdef CONFIG_SY8106A_POWER power_failed = sy8106a_set_vout1(CONFIG_SY8106A_VOUT1_VOLT); #endif |