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

Simon Glass sjg at chromium.org
Thu Dec 7 11:49:21 UTC 2017


Hi,

On 29 November 2017 at 06:08, Simon Glass <sjg at chromium.org> wrote:
> On 28 November 2017 at 19:45, Marek Vasut <marek.vasut at gmail.com> 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>
>> ---
>>  lib/fdtdec.c | 24 ++++++++++++++++++------
>>  1 file changed, 18 insertions(+), 6 deletions(-)
>
> Oh for a test of this code!
>
> Acked-by: Simon Glass <sjg at chromium.org>

This is in my queue but seems to have already made it to mainline.

Regards,
Simon


More information about the U-Boot mailing list