summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThirupathaiah Annapureddy <thiruan@linux.microsoft.com>2020-01-06 22:21:42 -0800
committerSimon Glass <sjg@chromium.org>2020-02-05 19:33:46 -0700
commit28b417ce859490d6b06e71dbf4e842841e64d34d (patch)
treeb5ea6ca4eb3ee9bb609a35e176bf85c12b5ca18a
parent400175b0a7daa062ed88def052ae6d54ec56a7e9 (diff)
downloadu-boot-28b417ce859490d6b06e71dbf4e842841e64d34d.tar.gz
u-boot-28b417ce859490d6b06e71dbf4e842841e64d34d.tar.bz2
u-boot-28b417ce859490d6b06e71dbf4e842841e64d34d.zip
image: fdt: check "status" of "/reserved-memory" subnodes
boot_fdt_add_mem_rsv_regions() scans the subnodes of "/reserved-memory" and adds them to reserved lmb regions. Currently this scanning does not take into "status" property. Even if the subnode is disabled, it gets added to the reserved lmb regions. This patch checks the "status" property before adding it to reserved lmb regions. Signed-off-by: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
-rw-r--r--common/image-fdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/image-fdt.c b/common/image-fdt.c
index dbb1e6e131..dbe8535f9c 100644
--- a/common/image-fdt.c
+++ b/common/image-fdt.c
@@ -122,7 +122,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);
- 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);