All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Stefan Roese <sr@denx.de>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH] mtd: physmap_of: Loop through all "reg" tuples for mapping
Date: Tue, 12 Oct 2010 11:55:03 +0300	[thread overview]
Message-ID: <1286873703.2164.8.camel@localhost> (raw)
In-Reply-To: <1286541687-5706-1-git-send-email-sr@denx.de>

On Fri, 2010-10-08 at 14:41 +0200, Stefan Roese wrote:
> This patch changes the loop over the "reg" tuples to not exit
> directly upon of_address_to_resource() failure but to continue
> with the next "reg" tuple instead. This failure could be due to
> size = 0, which might be passed via the device-tree.
> 
> This is needed for boards, where a "reg" tuple might have size 0
> (of_address_to_resource() returns with EINVAL when size = 0).
> 
> Example:
> 
> Fully equipped board:
> 
> 	reg = <0 0x00000000 0x00400000
> 	       0 0x00400000 0x00400000>;
> 
> Partially equipped board:
> 
> 	reg = <0 0x00000000 0x00400000
> 	       0 0x00400000 0x00000000>;
> 
> This could be the case on boards with runtime detection of
> multiple NOR flash configurations where the detected flash size
> is inserted into the dtb in U-Boot.
> 
> Signed-off-by: Stefan Roese <sr@denx.de>
> ---
>  drivers/mtd/maps/physmap_of.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)

Pushed to l2-mtd-2.6.git, thanks!

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

      reply	other threads:[~2010-10-12  8:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 12:41 [PATCH] mtd: physmap_of: Loop through all "reg" tuples for mapping Stefan Roese
2010-10-12  8:55 ` Artem Bityutskiy [this message]

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=1286873703.2164.8.camel@localhost \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=sr@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.