From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Tue, 9 Oct 2018 08:59:13 +0200 Subject: [U-Boot] [PATCH 11/14] mips: mt76xx: gardena-smart-gateway: Add board_late_init() to set LED def state In-Reply-To: <20181009065916.31977-1-sr@denx.de> References: <20181009065916.31977-1-sr@denx.de> Message-ID: <20181009065916.31977-11-sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This is needed to set the LEDs automatically to a default state, as configured in the dts. Signed-off-by: Stefan Roese Cc: Daniel Schwierzeck --- arch/mips/mach-mt7620/Kconfig | 1 + board/gardena/smart-gateway-mt7688/board.c | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/arch/mips/mach-mt7620/Kconfig b/arch/mips/mach-mt7620/Kconfig index e42d918ba0..6f6952afd0 100644 --- a/arch/mips/mach-mt7620/Kconfig +++ b/arch/mips/mach-mt7620/Kconfig @@ -25,6 +25,7 @@ choice config BOARD_GARDENA_SMART_GATEWAY_MT7688 bool "Gardena Smart Gateway" depends on SOC_MT7620 + select BOARD_LATE_INIT select SUPPORTS_BOOT_RAM help Gardena Smart Gateway boards have a MT7688 SoC with 128 MiB of RAM diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c index 838dfc205b..3a1838e44a 100644 --- a/board/gardena/smart-gateway-mt7688/board.c +++ b/board/gardena/smart-gateway-mt7688/board.c @@ -4,6 +4,7 @@ */ #include +#include #include #define MT76XX_AGPIO_CFG 0x1000003c @@ -18,3 +19,11 @@ int board_early_init_f(void) return 0; } + +int board_late_init(void) +{ + if (IS_ENABLED(CONFIG_LED)) + led_default_state(); + + return 0; +} -- 2.19.1