Merge tag 'u-boot-atmel-fixes-2020.07-a' of https://gitlab.denx.de/u-boot/custodians...
[oweals/u-boot.git] / arch / x86 / lib / fsp2 / fsp_init.c
index da9bd6b45cfb9afef900cc4faa65276653a6a714..85cae54a0cad5cd9a7dc13b3d3c4735682defb77 100644 (file)
@@ -6,9 +6,11 @@
 #include <common.h>
 #include <binman.h>
 #include <binman_sym.h>
+#include <bootstage.h>
 #include <cbfs.h>
 #include <dm.h>
 #include <init.h>
+#include <log.h>
 #include <spi.h>
 #include <spl.h>
 #include <spi_flash.h>
@@ -23,7 +25,7 @@ int arch_cpu_init_dm(void)
        int ret;
 
        /* Make sure pads are set up early in U-Boot */
-       if (spl_phase() != PHASE_BOARD_F)
+       if (!ll_boot_init() || spl_phase() != PHASE_BOARD_F)
                return 0;
 
        /* Probe all pinctrl devices to set up the pads */
@@ -79,11 +81,10 @@ static int get_cbfs_fsp(enum fsp_type_t type, ulong map_base,
         * 'COREBOOT' (CBFS, size 1814528, offset 2117632).
         */
        ulong cbfs_base = 0x205000;
-       ulong cbfs_size = 0x1bb000;
        struct cbfs_priv *cbfs;
        int ret;
 
-       ret = cbfs_init_mem(map_base + cbfs_base, cbfs_size, &cbfs);
+       ret = cbfs_init_mem(map_base + cbfs_base, &cbfs);
        if (ret)
                return ret;
        if (!ret) {