Merge tag 'xilinx-for-v2021.01-v2' of https://gitlab.denx.de/u-boot/custodians/u...
[pandora-u-boot.git] / common / spl / spl_atf.c
index 702367b..9bd25f6 100644 (file)
 #include <atf_common.h>
 #include <cpu_func.h>
 #include <errno.h>
+#include <image.h>
+#include <log.h>
 #include <spl.h>
+#include <asm/cache.h>
 
 static struct bl2_to_bl31_params_mem bl31_params_mem;
 static struct bl31_params *bl2_to_bl31_params;
@@ -129,10 +132,11 @@ static int spl_fit_images_find(void *blob, int os)
 uintptr_t spl_fit_images_get_entry(void *blob, int node)
 {
        ulong  val;
+       int ret;
 
-       val = fdt_getprop_u32(blob, node, "entry-point");
-       if (val == FDT_ERROR)
-               val = fdt_getprop_u32(blob, node, "load-addr");
+       ret = fit_image_get_entry(blob, node, &val);
+       if (ret)
+               ret = fit_image_get_load(blob, node, &val);
 
        debug("%s: entry point 0x%lx\n", __func__, val);
        return val;