
On Thu, Mar 17, 2022 at 8:27 AM Frieder Schrempf < frieder.schrempf@kontron.de> wrote:
Hi Stefano,
this old patch was delegated to you in patchwork. If you're not the correct maintainer to address, please let me know. As the NAND layer seems to be unmaintained at the moment, I'm not sure whom to ask.
This patch fixes a regression that was introduced by 616f03dabacb (" mtd: gpmi: change the BCH layout setting for large oob NAND") which alters the BCH layout in a way that doesn't match with the implementation in the Linux kernel.
This causes failures when loading an UBI image in U-Boot that was flashed by Linux or vice versa (see [1]).
There has been an approach to fix this through an optional devicetree property in 51cdf83eea ("mtd: gpmi: provide the option to use legacy bch geometry"), but this is not acceptable. The "legacy" BCH layout compatible with Linux should be used by default.
The approach to upstream the "new" layout to the kernel [2] seems to be stalled and even if it would succeed, it would break systems that use an old U-Boot and a new kernel, which is again not really acceptable in my opinion.
Hi Frieder,
I am not in office this week. I will send another patch set to change in both kernel and u-boot to fix the compatible issue.
For the reasons above I would like to ask U-Boot maintainers to pick up this patch.
Thanks Frieder
[1] https://lists.denx.de/pipermail/u-boot/2022-March/477828.html [2]
https://patchwork.ozlabs.org/project/linux-mtd/patch/20210522205136.19465-2-...
Am 20.05.21 um 11:09 schrieb Sean Nyekjaer:
On 13/05/2021 22.02, han.xu wrote:
On 21/05/11 07:08AM, Sean Nyekjaer wrote:
Caution: EXT Email
On 11/05/2021 04.49, han.xu wrote:
On 21/05/10 12:00PM, Sean Nyekjaer wrote:
Caution: EXT Email
Linux kernel defaults to use legacy bch setting, this was creating a mismatch between U-boot and Linux default settings.
Kernel uses the NAND chip specified minimum ecc strength and steps by
default
not the legacy bch setting, unless users enable it in DT file.
Hi,
Adding, mtd-list and Miquel
With u-boot dtb: &gpmi { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpmi_nand1>; compatible = "fsl,imx7d-gpmi-nand"; nand-on-flash-bbt; status = "okay"; };
With linux dtb (mainline 5.10): &gpmi { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpmi_nand1>; nand-on-flash-bbt; status = "okay"; };
U-boot prior to commit 51cdf83eea selected 18 bit ECC, after that
commit it selects 8 bits.
With legacy option it selects 18. Linux is selecting 18 bits ;) So now we have a mismatch.
I have been searching for the legacy option in the mainline kernel
can't find it ;)
Please show me where it is (is it in the NXP fork?)
You are right, it's only fixed in NXP fork, with kernel driver
modification. We
prefer the current u-boot bch geometry, so I will send out a kernel
patch to
make them align.
Any progress on this?
I see your patch in:
https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource.cod...
But I can't find the option for selecting legacy mode in the
devicetree...
/Sean
Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/