All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Marek Vasut <marex@denx.de>,
	Francesco Dolcini <francesco@dolcini.it>,
	Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH v1 1/3] fdt: validate/fix cells count on mtdpart fixup
Date: Tue, 24 Jan 2023 09:41:41 +0100	[thread overview]
Message-ID: <Y8+ZxTu05BEu5knS@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <20230123105610.38034a11@xps-13>

Hello Miquel,

On Mon, Jan 23, 2023 at 10:56:10AM +0100, Miquel Raynal wrote:
> marex@denx.de wrote on Tue, 17 Jan 2023 01:59:54 +0100:
> 
> > On 1/16/23 19:00, Francesco Dolcini wrote:
> > > On Mon, Jan 16, 2023 at 06:54:44PM +0100, Marek Vasut wrote:  
> > >> On 1/16/23 15:20, Francesco Dolcini wrote:  
> > >>> On Sun, Jan 15, 2023 at 03:35:25PM +0100, Marek Vasut wrote:  
> > >>>> On 1/13/23 19:45, Francesco Dolcini wrote:  
> > >>>>> From: Francesco Dolcini <francesco.dolcini@toradex.com>
> > >>>>>
> > >>>>> Fixup #size-cells value when updating the MTD partitions, this is
> > >>>>> required to prevent issues in case the MTD parent set #size-cells to
> > >>>>> zero.
> > >>>>> This could happen for example in the legacy case in which the partitions
> > >>>>> are created as direct child of the mtd node and that specific node has
> > >>>>> no children. Recent clean-up on Linux device tree files created a boot
> > >>>>> regression on colibri-imx7.
> > >>>>>
> > >>>>> This fixup has the limitation to assume 32-bit (#size-cells=1)
> > >>>>> addressing, therefore it will not work with device bigger than 4GiB.
> > >>>>>
> > >>>>> This change also enforce #address-cells to be the same as #size-cells,
> > >>>>> this was already silently enforced by fdt_node_set_part_info(), now this
> > >>>>> is checked explicitly and partition fixup will just fail in such case.
> > >>>>>
> > >>>>> In general board should not generally need nor use this functionality
> > >>>>> and should be just deprecated, passing mtdparts= in the kernel command
> > >>>>> line is the preferred way according to Linux MTD subsystem maintainer.
> 
> Just to be clear, I'm perfectly fine with the partitions being either
> on the cmdline or in the DT without preference (well, the cmdline only
> works with the simple generic parser, but whatever). What I really
> meant is that tweaking the DT from U-Boot should be rare and in no case
> the "right thing to add partitions".

Miquel, should I send a v2 to clarify the commit message or you do not
mind keeping it as it is?

Francesco


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: Francesco Dolcini <francesco@dolcini.it>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Marek Vasut <marex@denx.de>,
	Francesco Dolcini <francesco@dolcini.it>,
	Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	linux-mtd@lists.infradead.org
Subject: Re: [PATCH v1 1/3] fdt: validate/fix cells count on mtdpart fixup
Date: Tue, 24 Jan 2023 09:41:41 +0100	[thread overview]
Message-ID: <Y8+ZxTu05BEu5knS@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <20230123105610.38034a11@xps-13>

Hello Miquel,

On Mon, Jan 23, 2023 at 10:56:10AM +0100, Miquel Raynal wrote:
> marex@denx.de wrote on Tue, 17 Jan 2023 01:59:54 +0100:
> 
> > On 1/16/23 19:00, Francesco Dolcini wrote:
> > > On Mon, Jan 16, 2023 at 06:54:44PM +0100, Marek Vasut wrote:  
> > >> On 1/16/23 15:20, Francesco Dolcini wrote:  
> > >>> On Sun, Jan 15, 2023 at 03:35:25PM +0100, Marek Vasut wrote:  
> > >>>> On 1/13/23 19:45, Francesco Dolcini wrote:  
> > >>>>> From: Francesco Dolcini <francesco.dolcini@toradex.com>
> > >>>>>
> > >>>>> Fixup #size-cells value when updating the MTD partitions, this is
> > >>>>> required to prevent issues in case the MTD parent set #size-cells to
> > >>>>> zero.
> > >>>>> This could happen for example in the legacy case in which the partitions
> > >>>>> are created as direct child of the mtd node and that specific node has
> > >>>>> no children. Recent clean-up on Linux device tree files created a boot
> > >>>>> regression on colibri-imx7.
> > >>>>>
> > >>>>> This fixup has the limitation to assume 32-bit (#size-cells=1)
> > >>>>> addressing, therefore it will not work with device bigger than 4GiB.
> > >>>>>
> > >>>>> This change also enforce #address-cells to be the same as #size-cells,
> > >>>>> this was already silently enforced by fdt_node_set_part_info(), now this
> > >>>>> is checked explicitly and partition fixup will just fail in such case.
> > >>>>>
> > >>>>> In general board should not generally need nor use this functionality
> > >>>>> and should be just deprecated, passing mtdparts= in the kernel command
> > >>>>> line is the preferred way according to Linux MTD subsystem maintainer.
> 
> Just to be clear, I'm perfectly fine with the partitions being either
> on the cmdline or in the DT without preference (well, the cmdline only
> works with the simple generic parser, but whatever). What I really
> meant is that tweaking the DT from U-Boot should be rare and in no case
> the "right thing to add partitions".

Miquel, should I send a v2 to clarify the commit message or you do not
mind keeping it as it is?

Francesco


  reply	other threads:[~2023-01-24  8:42 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 18:45 [PATCH v1 0/3] fdt: Fix mtparts fixup Francesco Dolcini
2023-01-13 18:45 ` Francesco Dolcini
2023-01-13 18:45 ` [PATCH v1 1/3] fdt: validate/fix cells count on mtdpart fixup Francesco Dolcini
2023-01-13 18:45   ` Francesco Dolcini
2023-01-15 14:35   ` Marek Vasut
2023-01-15 14:35     ` Marek Vasut
2023-01-16 14:20     ` Francesco Dolcini
2023-01-16 14:20       ` Francesco Dolcini
2023-01-16 17:54       ` Marek Vasut
2023-01-16 17:54         ` Marek Vasut
2023-01-16 18:00         ` Francesco Dolcini
2023-01-16 18:00           ` Francesco Dolcini
2023-01-17  0:59           ` Marek Vasut
2023-01-17  0:59             ` Marek Vasut
2023-01-23  9:56             ` Miquel Raynal
2023-01-23  9:56               ` Miquel Raynal
2023-01-24  8:41               ` Francesco Dolcini [this message]
2023-01-24  8:41                 ` Francesco Dolcini
2023-01-24  8:58                 ` Miquel Raynal
2023-01-24  8:58                   ` Miquel Raynal
2023-01-24 10:24                   ` Francesco Dolcini
2023-01-24 10:24                     ` Francesco Dolcini
2023-01-13 18:45 ` [PATCH v1 2/3] colibri-imx7: specify MTD partitions on command line Francesco Dolcini
2023-01-15 14:33   ` Marek Vasut
2023-01-16 13:58     ` Francesco Dolcini
2023-01-23  9:58       ` Miquel Raynal
2023-01-13 18:45 ` [PATCH v1 3/3] colibri-imx6ull: " Francesco Dolcini
2023-01-13 19:34 ` [PATCH v1 0/3] fdt: Fix mtparts fixup Tom Rini
2023-01-13 19:34   ` Tom Rini
2023-01-23 10:06   ` Miquel Raynal
2023-01-23 10:06     ` Miquel Raynal
2023-01-23 20:01     ` Tom Rini
2023-01-23 20:01       ` Tom Rini
2023-02-23 10:23       ` Patrick DELAUNAY
2023-02-23 10:23         ` Patrick DELAUNAY
2023-02-23 22:35         ` Tom Rini
2023-02-23 22:35           ` Tom Rini

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=Y8+ZxTu05BEu5knS@francesco-nb.int.toradex.com \
    --to=francesco@dolcini.it \
    --cc=francesco.dolcini@toradex.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marex@denx.de \
    --cc=miquel.raynal@bootlin.com \
    --cc=sjg@chromium.org \
    --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 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.