Merge tag 'video-next' of https://gitlab.denx.de/u-boot/custodians/u-boot-video into...
[platform/kernel/u-boot.git] / board / freescale / c29xpcie / spl.c
index d8d73c7..421c2d4 100644 (file)
@@ -1,10 +1,12 @@
+// 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_internal.h>
+#include <init.h>
 #include <ns16550.h>
 #include <malloc.h>
 #include <mmc.h>
@@ -53,7 +55,7 @@ void board_init_r(gd_t *gd, ulong dest_addr)
        bd->bi_memstart = CONFIG_SYS_INIT_L2_ADDR;
        bd->bi_memsize = CONFIG_SYS_L2_SIZE;
 
-       probecpu();
+       arch_cpu_init();
        get_clocks();
        mem_malloc_init(CONFIG_SPL_RELOC_MALLOC_ADDR,
                        CONFIG_SPL_RELOC_MALLOC_SIZE);
@@ -61,13 +63,13 @@ void board_init_r(gd_t *gd, ulong dest_addr)
 
        /* 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;
 
        i2c_init_all();
 
-       gd->ram_size = initdram(0);
+       dram_init();
 
 #ifdef CONFIG_SPL_NAND_BOOT
        puts("TPL\n");