Merge branch '2022-08-04-Kconfig-migrations'
[platform/kernel/u-boot.git] / board / gardena / smart-gateway-mt7688 / board.c
index e9ffd42..0cfde91 100644 (file)
@@ -4,12 +4,19 @@
  */
 
 #include <common.h>
+#include <command.h>
 #include <env.h>
 #include <env_internal.h>
+#include <init.h>
 #include <led.h>
+#include <log.h>
+#include <malloc.h>
 #include <net.h>
 #include <spi.h>
 #include <spi_flash.h>
+#include <linux/delay.h>
+#include <linux/stringify.h>
+#include <u-boot/crc.h>
 #include <uuid.h>
 #include <linux/ctype.h>
 #include <linux/io.h>
@@ -175,9 +182,6 @@ err_free:
 
 int board_late_init(void)
 {
-       if (IS_ENABLED(CONFIG_LED))
-               led_default_state();
-
        factory_data_env_config();
 
        return 0;
@@ -202,7 +206,7 @@ static void copy_or_generate_uuid(char *fd_ptr, const char *env_var_name)
  * Helper function to provide some sane factory-data values for testing
  * purpose, when these values are not programmed correctly
  */
-int do_fd_write(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_fd_write(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
        struct factory_data_values *fd;
        struct spi_flash *sf;
@@ -292,8 +296,10 @@ err_free:
        return ret;
 }
 
+#ifndef CONFIG_SPL_BUILD
 U_BOOT_CMD(
        fd_write,       1,      0,      do_fd_write,
        "Write test factory-data values to SPI NOR",
        "\n"
 );
+#endif