From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thirupathaiah Annapureddy Date: Tue, 4 Feb 2020 09:09:03 -0800 Subject: [PATCH] image: fdt: check "status" of "/reserved-memory" subnodes In-Reply-To: References: <20200107062142.24672-1-thiruan@linux.microsoft.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Thank You Simon for the review. May I know what are the next steps in making forward progress on this? Best Regards, Thiru On 1/7/2020 12:33 AM, Simon Goldschmidt wrote: > On Tue, Jan 7, 2020 at 7:21 AM Thirupathaiah Annapureddy > wrote: >> >> 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 > > Reviewed-by: Simon Goldschmidt > >> --- >> 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 >>