From: Thirupathaiah Annapureddy <thiruan@linux.microsoft.com>
To: u-boot@lists.denx.de
Subject: [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes
Date: Mon, 6 Jan 2020 22:21:42 -0800 [thread overview]
Message-ID: <20200107062142.24672-1-thiruan@linux.microsoft.com> (raw)
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>
---
common/image-fdt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/image-fdt.c b/common/image-fdt.c
index 48388488d9..cf13d655c0 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);
--
2.24.1
next reply other threads:[~2020-01-07 6:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-07 6:21 Thirupathaiah Annapureddy [this message]
2020-01-07 8:33 ` [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes Simon Goldschmidt
2020-02-04 17:09 ` Thirupathaiah Annapureddy
2020-02-05 0:16 ` Simon Glass
2020-02-05 17:58 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200107062142.24672-1-thiruan@linux.microsoft.com \
--to=thiruan@linux.microsoft.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox