From: han.xu Date: Thu, 13 May 2021 15:02:42 -0500 Subject: [EXT] [PATCH] mtd: mxs_nand: default to legacy bch and rename to modern bch option In-Reply-To: References: <20210510100043.449294-1-sean@geanix.com> <20210511024926.t6kunesknbwe7k2x@umbrella> Message-ID: <20210513200242.fxvfvwgua35hbqvr@umbrella> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. > > /Sean