[EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option
Frieder Schrempf
frieder.schrempf at kontron.de
Thu Mar 17 06:54:21 PDT 2022
Hi Han,
Am 17.03.22 um 14:33 schrieb Han Xu:
>
>
> On Thu, Mar 17, 2022 at 8:27 AM Frieder Schrempf
> <frieder.schrempf at kontron.de <mailto:frieder.schrempf at 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.
You already claimed that months ago, but nothing happened:
> I will send patches for both kernel and u-boot to use legacy bch
> scheme by default, and add some code to treat few MLC nand chips as
> corner cases.
Sean's U-Boot patch is effectively reverting the default behavior to use
the "legacy" BCH scheme. So that's in line with what you want to do and
you can base your work on top of this fix. But we should get the basic
fix in regardless.
Even more so because switching the layout in U-Boot by using
fsl,legacy-bch-geometry in the devicetree requires CONFIG_DM_MTD=y,
which causes the bootloader size to increase by around 250 KiB in my
case which might not be an option for some boards.
Thanks
Frieder
More information about the linux-mtd
mailing list