mips: mt76xx: gardena-smart-gateway: Add board_late_init() to set LED def state
authorStefan Roese <sr@denx.de>
Tue, 9 Oct 2018 06:59:13 +0000 (08:59 +0200)
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
Sun, 18 Nov 2018 15:02:23 +0000 (16:02 +0100)
This is needed to set the LEDs automatically to a default state, as
configured in the dts.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
arch/mips/mach-mt7620/Kconfig
board/gardena/smart-gateway-mt7688/board.c

index 13a7bd2cc0354ff03ce7117d4e01b23a269d91fe..4ebcb4b053cb16a08c549309d46ea9440268d7ac 100644 (file)
@@ -24,6 +24,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
index 838dfc205b3645c4add203c92e8e6257cc405af3..3a1838e44a9a48f2ca2c8d355266c685b2ff01f5 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <common.h>
+#include <led.h>
 #include <linux/io.h>
 
 #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;
+}