[U-Boot] [PATCH] fdtdec: Support parsing multiple /memory nodes

Tom Rini trini at konsulko.com
Wed Nov 29 02:58:15 UTC 2017


On Wed, Nov 29, 2017 at 03:45:45AM +0100, Marek Vasut wrote:

> It is legal to have multiple /memory nodes in a device tree . Currently,
> fdtdec_setup_memory_size() only supports parsing the first node . This
> patch extends the function such that if a particular /memory node does
> no longer have further "reg" entries and CONFIG_NR_DRAM_BANKS still
> allows for more DRAM banks, the code moves on to the next memory node
> and checks it's "reg"s. This makes it possible to handle both systems
> with single memory node with multiple entries and systems with multiple
> memory nodes with single entry.
> 
> Signed-off-by: Marek Vasut <marek.vasut+renesas at gmail.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: Simon Glass <sjg at chromium.org>

https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf
says that multiple nodes can be used, so this is the correct fix here.
Thanks!

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171128/bf20f9fe/attachment.sig>


More information about the U-Boot mailing list