All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Dolcini <francesco@dolcini.it>
To: Marek Vasut <marex@denx.de>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Francesco Dolcini <francesco@dolcini.it>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-mtd@lists.infradead.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v1] Revert "ARM: dts: imx7: Fix NAND controller size-cells"
Date: Wed, 7 Dec 2022 08:49:54 +0100	[thread overview]
Message-ID: <Y5BFos83ceVi2pu2@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <738f260d-225b-7ecf-20b2-a7541c368d36@denx.de>

On Tue, Dec 06, 2022 at 08:02:45PM +0100, Marek Vasut wrote:
> On 12/6/22 11:16, Miquel Raynal wrote:
> > Hi Francesco,
> 
> Hello everyone,
> 
> > francesco@dolcini.it wrote on Mon, 5 Dec 2022 20:07:18 +0100:
> > 
> > > On Mon, Dec 05, 2022 at 07:52:08PM +0100, Marek Vasut wrote:
> > > > On 12/5/22 19:18, Miquel Raynal wrote:
> > > > > marex@denx.de wrote on Mon, 5 Dec 2022 19:07:14 +0100:
> > > > > > On 12/5/22 18:58, Miquel Raynal wrote:
> > > > > > > , it's not
> > > > > > > complex to do, there are plenty of examples. This would be IMHO a
> > > > > > > better step ahead rather than just a cell change. Anyway, I don't mind
> > > > > > > reverting this once we've sorted this mess out and fixed U-Boot.
> > > > > > 
> > > > > > Won't we still have issues with older bootloader versions which
> > > > > > paste partitions directly into this &gpmi {} node, and which needs
> > > > > > to be fixed up in the parser in the end ?
> > > > > 
> > > > > I believe fdt_fixup_mtdparts() should be killed, so we should no longer
> > > > > have this problem.
> > > > 
> > > > The fdt_fixup_mtdparts is U-Boot code. If contemporary Linux kernel is
> > > > booted with ancient U-Boot, then you would still get defective DT passed to
> > > > Linux, and that should be fixed up by Linux. Removing fdt_fixup_mtdparts()
> > > > from current mainline U-Boot won't solve this problem.
> > > > 
> > > > I think this is also what Francesco is trying to convey (please correct me
> > > > if I'm wrong).
> > 
> > If we can get rid of fdt_fixup_mtdparts(), it means someone has to
> > create the partitions. I guess the easy way would be to just provide
> > mtdparts to Linux like all the other boards and let Linux deal with it.
> 
> This is based on an assumption that the platform kernel command line can be
> updated to insert such a workaround. If Francesco cannot update the
> bootloader, the kernel command line may be immutable all the same.

Exactly.

What I can do is update the latest stuff and enable people to upgrade, eventually.
But here we are talking about a board that is just generally available
in high volume to a multitude of people since years ... in practice the
vast majority of the users will not upgrade it.

> > Then we can just assume in Linux that perhaps if the partitions are
> > invalid (#size-cell is wrong?) then we should just stop their creation
> > and fallback to another mechanism instead of failing entirely. This way
> > no need for hackish changes in the parsers and compatibility is still
> > valid with old U-Boot (if mtdparts was provided on the cmdline, to be
> > checked). Otherwise we'll have to deal with it in Linux, that's a pity.
> 
> I am very much banking toward -- fix it up in the parser, just like any
> other firmware issue.

I agree again.

> Esp. since the fix up is printing a warning, and it is like a 2-liner
> patch.
Here we might assess if we need more to handle the other weird situation
in which a `partitions{}` node is present, U-Boot ignores it and the
kernel fails to detect the partitions. As of today colibri-imx7 is not
affected by this.

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: Marek Vasut <marex@denx.de>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Francesco Dolcini <francesco@dolcini.it>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-mtd@lists.infradead.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v1] Revert "ARM: dts: imx7: Fix NAND controller size-cells"
Date: Wed, 7 Dec 2022 08:49:54 +0100	[thread overview]
Message-ID: <Y5BFos83ceVi2pu2@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <738f260d-225b-7ecf-20b2-a7541c368d36@denx.de>

On Tue, Dec 06, 2022 at 08:02:45PM +0100, Marek Vasut wrote:
> On 12/6/22 11:16, Miquel Raynal wrote:
> > Hi Francesco,
> 
> Hello everyone,
> 
> > francesco@dolcini.it wrote on Mon, 5 Dec 2022 20:07:18 +0100:
> > 
> > > On Mon, Dec 05, 2022 at 07:52:08PM +0100, Marek Vasut wrote:
> > > > On 12/5/22 19:18, Miquel Raynal wrote:
> > > > > marex@denx.de wrote on Mon, 5 Dec 2022 19:07:14 +0100:
> > > > > > On 12/5/22 18:58, Miquel Raynal wrote:
> > > > > > > , it's not
> > > > > > > complex to do, there are plenty of examples. This would be IMHO a
> > > > > > > better step ahead rather than just a cell change. Anyway, I don't mind
> > > > > > > reverting this once we've sorted this mess out and fixed U-Boot.
> > > > > > 
> > > > > > Won't we still have issues with older bootloader versions which
> > > > > > paste partitions directly into this &gpmi {} node, and which needs
> > > > > > to be fixed up in the parser in the end ?
> > > > > 
> > > > > I believe fdt_fixup_mtdparts() should be killed, so we should no longer
> > > > > have this problem.
> > > > 
> > > > The fdt_fixup_mtdparts is U-Boot code. If contemporary Linux kernel is
> > > > booted with ancient U-Boot, then you would still get defective DT passed to
> > > > Linux, and that should be fixed up by Linux. Removing fdt_fixup_mtdparts()
> > > > from current mainline U-Boot won't solve this problem.
> > > > 
> > > > I think this is also what Francesco is trying to convey (please correct me
> > > > if I'm wrong).
> > 
> > If we can get rid of fdt_fixup_mtdparts(), it means someone has to
> > create the partitions. I guess the easy way would be to just provide
> > mtdparts to Linux like all the other boards and let Linux deal with it.
> 
> This is based on an assumption that the platform kernel command line can be
> updated to insert such a workaround. If Francesco cannot update the
> bootloader, the kernel command line may be immutable all the same.

Exactly.

What I can do is update the latest stuff and enable people to upgrade, eventually.
But here we are talking about a board that is just generally available
in high volume to a multitude of people since years ... in practice the
vast majority of the users will not upgrade it.

> > Then we can just assume in Linux that perhaps if the partitions are
> > invalid (#size-cell is wrong?) then we should just stop their creation
> > and fallback to another mechanism instead of failing entirely. This way
> > no need for hackish changes in the parsers and compatibility is still
> > valid with old U-Boot (if mtdparts was provided on the cmdline, to be
> > checked). Otherwise we'll have to deal with it in Linux, that's a pity.
> 
> I am very much banking toward -- fix it up in the parser, just like any
> other firmware issue.

I agree again.

> Esp. since the fix up is printing a warning, and it is like a 2-liner
> patch.
Here we might assess if we need more to handle the other weird situation
in which a `partitions{}` node is present, U-Boot ignores it and the
kernel fails to detect the partitions. As of today colibri-imx7 is not
affected by this.

Francesco


WARNING: multiple messages have this Message-ID (diff)
From: Francesco Dolcini <francesco@dolcini.it>
To: Marek Vasut <marex@denx.de>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
	Francesco Dolcini <francesco@dolcini.it>,
	Shawn Guo <shawnguo@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Francesco Dolcini <francesco.dolcini@toradex.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	devicetree@vger.kernel.org, linux-mtd@lists.infradead.org,
	stable@vger.kernel.org
Subject: Re: [PATCH v1] Revert "ARM: dts: imx7: Fix NAND controller size-cells"
Date: Wed, 7 Dec 2022 08:49:54 +0100	[thread overview]
Message-ID: <Y5BFos83ceVi2pu2@francesco-nb.int.toradex.com> (raw)
In-Reply-To: <738f260d-225b-7ecf-20b2-a7541c368d36@denx.de>

On Tue, Dec 06, 2022 at 08:02:45PM +0100, Marek Vasut wrote:
> On 12/6/22 11:16, Miquel Raynal wrote:
> > Hi Francesco,
> 
> Hello everyone,
> 
> > francesco@dolcini.it wrote on Mon, 5 Dec 2022 20:07:18 +0100:
> > 
> > > On Mon, Dec 05, 2022 at 07:52:08PM +0100, Marek Vasut wrote:
> > > > On 12/5/22 19:18, Miquel Raynal wrote:
> > > > > marex@denx.de wrote on Mon, 5 Dec 2022 19:07:14 +0100:
> > > > > > On 12/5/22 18:58, Miquel Raynal wrote:
> > > > > > > , it's not
> > > > > > > complex to do, there are plenty of examples. This would be IMHO a
> > > > > > > better step ahead rather than just a cell change. Anyway, I don't mind
> > > > > > > reverting this once we've sorted this mess out and fixed U-Boot.
> > > > > > 
> > > > > > Won't we still have issues with older bootloader versions which
> > > > > > paste partitions directly into this &gpmi {} node, and which needs
> > > > > > to be fixed up in the parser in the end ?
> > > > > 
> > > > > I believe fdt_fixup_mtdparts() should be killed, so we should no longer
> > > > > have this problem.
> > > > 
> > > > The fdt_fixup_mtdparts is U-Boot code. If contemporary Linux kernel is
> > > > booted with ancient U-Boot, then you would still get defective DT passed to
> > > > Linux, and that should be fixed up by Linux. Removing fdt_fixup_mtdparts()
> > > > from current mainline U-Boot won't solve this problem.
> > > > 
> > > > I think this is also what Francesco is trying to convey (please correct me
> > > > if I'm wrong).
> > 
> > If we can get rid of fdt_fixup_mtdparts(), it means someone has to
> > create the partitions. I guess the easy way would be to just provide
> > mtdparts to Linux like all the other boards and let Linux deal with it.
> 
> This is based on an assumption that the platform kernel command line can be
> updated to insert such a workaround. If Francesco cannot update the
> bootloader, the kernel command line may be immutable all the same.

Exactly.

What I can do is update the latest stuff and enable people to upgrade, eventually.
But here we are talking about a board that is just generally available
in high volume to a multitude of people since years ... in practice the
vast majority of the users will not upgrade it.

> > Then we can just assume in Linux that perhaps if the partitions are
> > invalid (#size-cell is wrong?) then we should just stop their creation
> > and fallback to another mechanism instead of failing entirely. This way
> > no need for hackish changes in the parsers and compatibility is still
> > valid with old U-Boot (if mtdparts was provided on the cmdline, to be
> > checked). Otherwise we'll have to deal with it in Linux, that's a pity.
> 
> I am very much banking toward -- fix it up in the parser, just like any
> other firmware issue.

I agree again.

> Esp. since the fix up is printing a warning, and it is like a 2-liner
> patch.
Here we might assess if we need more to handle the other weird situation
in which a `partitions{}` node is present, U-Boot ignores it and the
kernel fails to detect the partitions. As of today colibri-imx7 is not
affected by this.

Francesco


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-12-07  7:51 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-05 15:23 [PATCH v1] Revert "ARM: dts: imx7: Fix NAND controller size-cells" Francesco Dolcini
2022-12-05 15:23 ` Francesco Dolcini
2022-12-05 15:23 ` Francesco Dolcini
2022-12-05 16:26 ` Marek Vasut
2022-12-05 16:26   ` Marek Vasut
2022-12-05 16:26   ` Marek Vasut
2022-12-05 17:58   ` Miquel Raynal
2022-12-05 17:58     ` Miquel Raynal
2022-12-05 17:58     ` Miquel Raynal
2022-12-05 18:07     ` Marek Vasut
2022-12-05 18:07       ` Marek Vasut
2022-12-05 18:07       ` Marek Vasut
2022-12-05 18:15       ` Francesco Dolcini
2022-12-05 18:15         ` Francesco Dolcini
2022-12-05 18:15         ` Francesco Dolcini
2022-12-05 18:18       ` Miquel Raynal
2022-12-05 18:18         ` Miquel Raynal
2022-12-05 18:18         ` Miquel Raynal
2022-12-05 18:52         ` Marek Vasut
2022-12-05 18:52           ` Marek Vasut
2022-12-05 18:52           ` Marek Vasut
2022-12-05 19:07           ` Francesco Dolcini
2022-12-05 19:07             ` Francesco Dolcini
2022-12-05 19:07             ` Francesco Dolcini
2022-12-06 10:16             ` Miquel Raynal
2022-12-06 10:16               ` Miquel Raynal
2022-12-06 10:16               ` Miquel Raynal
2022-12-06 19:02               ` Marek Vasut
2022-12-06 19:02                 ` Marek Vasut
2022-12-06 19:02                 ` Marek Vasut
2022-12-07  7:49                 ` Francesco Dolcini [this message]
2022-12-07  7:49                   ` Francesco Dolcini
2022-12-07  7:49                   ` Francesco Dolcini
2022-12-08 10:51   ` Miquel Raynal
2022-12-08 10:51     ` Miquel Raynal
2022-12-08 10:51     ` Miquel Raynal
2022-12-08 11:13     ` Thorsten Leemhuis
2022-12-08 11:13       ` Thorsten Leemhuis
2022-12-08 11:13       ` Thorsten Leemhuis
2022-12-08 13:21     ` Marek Vasut
2022-12-08 13:21       ` Marek Vasut
2022-12-08 13:21       ` Marek Vasut
2022-12-08 13:49       ` Francesco Dolcini
2022-12-08 13:49         ` Francesco Dolcini
2022-12-08 13:49         ` Francesco Dolcini
2022-12-08 13:54         ` Marek Vasut
2022-12-08 13:54           ` Marek Vasut
2022-12-08 13:54           ` Marek Vasut
2022-12-08 16:26           ` Francesco Dolcini
2022-12-08 16:26             ` Francesco Dolcini
2022-12-08 16:26             ` Francesco Dolcini
2022-12-08 16:40     ` Francesco Dolcini
2022-12-08 16:40       ` Francesco Dolcini
2022-12-08 16:40       ` Francesco Dolcini
2022-12-09 13:30       ` Thorsten Leemhuis
2022-12-09 13:30         ` Thorsten Leemhuis
2022-12-09 13:30         ` Thorsten Leemhuis
2022-12-09 15:25         ` Arnd Bergmann
2022-12-09 15:25           ` Arnd Bergmann
2022-12-09 15:25           ` Arnd Bergmann
2022-12-09 15:38           ` Miquel Raynal
2022-12-09 15:38             ` Miquel Raynal
2022-12-09 15:38             ` Miquel Raynal
2022-12-05 16:31 ` Miquel Raynal
2022-12-05 16:31   ` Miquel Raynal
2022-12-05 16:31   ` Miquel Raynal

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=Y5BFos83ceVi2pu2@francesco-nb.int.toradex.com \
    --to=francesco@dolcini.it \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=francesco.dolcini@toradex.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=marex@denx.de \
    --cc=miquel.raynal@bootlin.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=stable@vger.kernel.org \
    /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.