[PATCH] board: ast2500/ast2600: initialize LEDs

Andrei Kartashev a.kartashev at yadro.com
Wed Nov 24 06:08:47 AEDT 2021


Add option to initialize LEDs in board_init stage for aspeed-based
boards.

Signed-off-by: Andrei Kartashev <a.kartashev at yadro.com>
---
 board/aspeed/evb_ast2500/evb_ast2500.c | 8 ++++++++
 board/aspeed/evb_ast2600/evb_ast2600.c | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/board/aspeed/evb_ast2500/evb_ast2500.c b/board/aspeed/evb_ast2500/evb_ast2500.c
index ed162c4095..9612513bfc 100644
--- a/board/aspeed/evb_ast2500/evb_ast2500.c
+++ b/board/aspeed/evb_ast2500/evb_ast2500.c
@@ -3,3 +3,11 @@
  * Copyright (c) 2016 Google, Inc
  */
 #include <common.h>
+
+int board_init(void)
+{
+	if (IS_ENABLED(CONFIG_LED))
+		led_default_state();
+
+	return 0;
+}
diff --git a/board/aspeed/evb_ast2600/evb_ast2600.c b/board/aspeed/evb_ast2600/evb_ast2600.c
index e6dc8c7952..9041798896 100644
--- a/board/aspeed/evb_ast2600/evb_ast2600.c
+++ b/board/aspeed/evb_ast2600/evb_ast2600.c
@@ -3,3 +3,11 @@
  * Copyright (c) Aspeed Technology Inc.
  */
 #include <common.h>
+
+int board_init(void)
+{
+	if (IS_ENABLED(CONFIG_LED))
+		led_default_state();
+
+	return 0;
+}
-- 
2.32.0



More information about the openbmc mailing list