projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '2020-05-15-kconfig-migrations'
[oweals/u-boot.git]
/
common
/
image-fdt.c
diff --git
a/common/image-fdt.c
b/common/image-fdt.c
index e70da3dcb33aaeb2bf72c3950b23949647751e18..3002948b6b0e219f25a31ce40125ec92ce46e6df 100644
(file)
--- a/
common/image-fdt.c
+++ b/
common/image-fdt.c
@@
-11,11
+11,14
@@
#include <common.h>
#include <fdt_support.h>
#include <fdtdec.h>
#include <common.h>
#include <fdt_support.h>
#include <fdtdec.h>
+#include <env.h>
#include <errno.h>
#include <image.h>
#include <errno.h>
#include <image.h>
+#include <malloc.h>
#include <linux/libfdt.h>
#include <mapmem.h>
#include <asm/io.h>
#include <linux/libfdt.h>
#include <mapmem.h>
#include <asm/io.h>
+#include <tee/optee.h>
#ifndef CONFIG_SYS_FDT_PAD
#define CONFIG_SYS_FDT_PAD 0x3000
#ifndef CONFIG_SYS_FDT_PAD
#define CONFIG_SYS_FDT_PAD 0x3000
@@
-120,7
+123,7
@@
void boot_fdt_add_mem_rsv_regions(struct lmb *lmb, void *fdt_blob)
/* check if this subnode has a reg property */
ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
&res);
/* check if this subnode has a reg property */
ret = fdt_get_resource(fdt_blob, subnode, "reg", 0,
&res);
- if (!ret) {
+ if (!ret
&& fdtdec_get_is_enabled(fdt_blob, subnode)
) {
addr = res.start;
size = res.end - res.start + 1;
boot_fdt_reserve_region(lmb, addr, size);
addr = res.start;
size = res.end - res.start + 1;
boot_fdt_reserve_region(lmb, addr, size);
@@
-283,7
+286,8
@@
int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
*of_flat_tree = NULL;
*of_size = 0;
*of_flat_tree = NULL;
*of_size = 0;
- img_addr = (argc == 0) ? load_addr : simple_strtoul(argv[0], NULL, 16);
+ img_addr = (argc == 0) ? image_load_addr :
+ simple_strtoul(argv[0], NULL, 16);
buf = map_sysmem(img_addr, 0);
if (argc > 2)
buf = map_sysmem(img_addr, 0);
if (argc > 2)
@@
-302,7
+306,7
@@
int boot_get_fdt(int flag, int argc, char * const argv[], uint8_t arch,
else if (images->fit_uname_os)
default_addr = (ulong)images->fit_hdr_os;
else
else if (images->fit_uname_os)
default_addr = (ulong)images->fit_hdr_os;
else
- default_addr = load_addr;
+ default_addr =
image_
load_addr;
if (fit_parse_conf(select, default_addr,
&fdt_addr, &fit_uname_config)) {
if (fit_parse_conf(select, default_addr,
&fdt_addr, &fit_uname_config)) {
@@
-560,6
+564,13
@@
int image_setup_libfdt(bootm_headers_t *images, void *blob,
}
}
}
}
+ fdt_ret = optee_copy_fdt_nodes(gd->fdt_blob, blob);
+ if (fdt_ret) {
+ printf("ERROR: transfer of optee nodes to new fdt failed: %s\n",
+ fdt_strerror(fdt_ret));
+ goto err;
+ }
+
/* Delete the old LMB reservation */
if (lmb)
lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
/* Delete the old LMB reservation */
if (lmb)
lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,