summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/fdtdec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index 91503b8..fbb48bf 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -4,6 +4,7 @@
*/
#ifndef USE_HOSTCC
+#include <boot_fit.h>
#include <common.h>
#include <dm.h>
#include <errno.h>
@@ -1221,6 +1222,15 @@ int fdtdec_setup(void)
gd->fdt_blob = (ulong *)&_image_binary_end;
else
gd->fdt_blob = (ulong *)&__bss_end;
+
+# elif defined CONFIG_FIT_EMBED
+ gd->fdt_blob = locate_dtb_in_fit(&_end);
+
+ if (gd->fdt_blob == NULL || gd->fdt_blob <= ((void *)&_end)) {
+ puts("Failed to find proper dtb in embedded FIT Image\n");
+ return -1;
+ }
+
# else
/* FDT is at end of image */
gd->fdt_blob = (ulong *)&_end;