public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fdtdec: Support parsing multiple /memory nodes
Date: Wed, 29 Nov 2017 04:11:26 +0100	[thread overview]
Message-ID: <f673b4b5-fd86-95e9-75b8-229abd2aed84@gmail.com> (raw)
In-Reply-To: <20171129025815.GN3587@bill-the-cat>

On 11/29/2017 03:58 AM, Tom Rini wrote:
> 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@gmail.com>
>> Cc: Tom Rini <trini@konsulko.com>
>> Cc: Simon Glass <sjg@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.

I am not a big fan of this kind of practice, but that's how our DTs are,
so it cannot be helped and we have to support this :-(

> Thanks!
> 
> Reviewed-by: Tom Rini <trini@konsulko.com>

Thanks.

-- 
Best regards,
Marek Vasut

  reply	other threads:[~2017-11-29  3:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  2:45 [U-Boot] [PATCH] fdtdec: Support parsing multiple /memory nodes Marek Vasut
2017-11-29  2:58 ` Tom Rini
2017-11-29  3:11   ` Marek Vasut [this message]
2017-11-29 13:08 ` Simon Glass
2017-12-07 11:49   ` Simon Glass
2017-11-29 13:23 ` Lothar Waßmann

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=f673b4b5-fd86-95e9-75b8-229abd2aed84@gmail.com \
    --to=marek.vasut@gmail.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