mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] mtd: partition: Fix OF partition fixup
Date: Mon, 27 Apr 2015 11:56:11 +0200	[thread overview]
Message-ID: <20150427095611.GJ19431@pengutronix.de> (raw)
In-Reply-To: <1430126650-6382-1-git-send-email-s.hauer@pengutronix.de>

Hello Sascha,

On Mon, Apr 27, 2015 at 11:24:10AM +0200, Sascha Hauer wrote:
> To get the number of address cells and size cells we have to use
> the newly created partition node, not the parent device node. The
> parent device node returns the address/size cells of the controller
> node, not the partition node.
seems like correctly "schlau gekuckt" and matching the problem report I
sent you (off-list).

Just tested your patch and it really fixes my problem, it works fine now
with and without passing a dtb for booting. As you pointed out this
doesn't explain though why the use case with an explicit dtb worked
already before. I verified that of_mtd_fixup is called there, but didn't
dig any deeper, e.g. by testing if the partitioning is really modified
if I did any changes. Will do so later today.

I'd formulate the commit log a tad more critical, like adding:

	On an am335x machine this fixes the device tree passed to Linux.
	The situation there is:

        ...
        gpmc@50000000 {
                ...
                #address-cells = <0x2>;
                #size-cells = <0x1>;
                ranges = <0x0 0x0 0x8000000 0x10000000>;
                ...
                nand@0,0 {
                        reg = <0x0 0x0 0x0>;
                        #address-cells = <0x1>;
                        #size-cells = <0x1>;
                        ...
                        partition@7 {
                                label = "system";
                                reg = <0x220000 0x7de0000>;
                        };
                };
        };

	and without this patch barebox passes three bytes for
	partition@7's reg property instead of only two which naturally
	confuses Linux and yields to the system partition to start at 0
	with a size of 0x220000.

Other than than that:

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-04-27  9:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  9:24 Sascha Hauer
2015-04-27  9:56 ` Uwe Kleine-König [this message]
2015-04-30 10:51 ` Marc Kleine-Budde
2015-05-04  7:22   ` Sascha Hauer

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=20150427095611.GJ19431@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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