Merge tag 'video-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-video into...
[platform/kernel/u-boot.git] / board / freescale / b4860qds / spl.c
index 60d7f0d..fe5ce35 100644 (file)
@@ -1,10 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /* Copyright 2013 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <clock_legacy.h>
 #include <console.h>
+#include <env.h>
+#include <env_internal.h>
+#include <init.h>
 #include <asm/spl.h>
 #include <malloc.h>
 #include <ns16550.h>
@@ -99,9 +102,9 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 #else
        /* relocate environment function pointers etc. */
        nand_spl_load_image(CONFIG_ENV_OFFSET, CONFIG_ENV_SIZE,
-                           (uchar *)CONFIG_ENV_ADDR);
-       gd->env_addr  = (ulong)(CONFIG_ENV_ADDR);
-       gd->env_valid = 1;
+                           (uchar *)SPL_ENV_ADDR);
+       gd->env_addr  = (ulong)(SPL_ENV_ADDR);
+       gd->env_valid = ENV_VALID;
 #endif
 
        i2c_init_all();