From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?J=F6rg?= Krause Date: Sat, 02 Feb 2019 20:22:34 +0100 Subject: [U-Boot] IMX6 NAND boot regression In-Reply-To: References: <373ab899-ed9f-d5b7-cae4-910d4666125e@toradex.com> Message-ID: <09aad6ea945f88f1d1012be96482a17502b7b20a.camel@embedded.rocks> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de Hi, On Sat, 2019-02-02 at 05:30 -0800, Adam Ford wrote: > On Sat, Feb 2, 2019 at 12:29 AM Jagan Teki w= rote: > > +Adam, Shyam > >=20 > > On Sat, 2 Feb, 2019, 8:49 AM Stefan Agner >=20 > > > Hi Tim, > > >=20 > > > On 02.02.19 03:32, Tim Harvey wrote: > > > > Stefan, > > > >=20 > > > > I'm trying to track down an IMX6 SPL NAND boot regression that star= ted > > > > in v2018.07 with your patch series to mxs_nand. > > >=20 > > > I am sorry about that. Unfortunately I did not had a design at hand w= here > > > I was able to test the NAND driver in SPL... > > >=20 > > > > I bisected it back to '5346c31e305a37d39f535cc0d5ae87d8b7e81230 mtd: > > > > nand: mxs_nand: use self init'. With this particular patch nand bbt > > > > scanning would crash the board because of nand_chip.scan_btt not be= ing > > > > assigned. This was later fixed in > > > > '96d0be07e7498e7174daa6f3b56fc807b9feb71d MTD: nand: mxs_nand_spl: = Fix > > > > empty function pointer for BBT' but cherry-picking that on top of > > > > 5346c31 fixes the immediate crash while scanning but then I find th= at > > > > mxs_read_page_ecc() hangs on the 4th page of reading u-boot.img from > > > > the NAND. This gets worse 2 patches later where in > > > > '28897e8d21f8e197e259a91c693de09cd81f2d5a: mtd: nand: mxs_nand: use > > > > structure for BCH geometry' I find that the first byte of every page > > > > read is wrong because mxs_nand_swap_block_mark() is getting called = on > > > > the page which swaps the first bytes with oob. > > > >=20 > > > > There are several IMX6 boards out there using both NAND and SPL I > > > > believe that I would assume were broken by this series. Any ideas on > > > > the proper resolution? > >=20 > > Look like 2017.03 can be stable boot from nand as for as my test is con= cern. > >=20 > > We are also trying hard using git bisect, but seems like multiple break= ings. > >=20 > > Will keep posted if something move further. >=20 > From a different thread, someone was able to test these patches and > found they fixed their booting issues: >=20 > There was a broken function pointer here that was fixed and applied > the imx-master, but pending merge with master > http://patchwork.ozlabs.org/patch/1019440/ >=20 > Configure ECC from SPL here: > http://patchwork.ozlabs.org/patch/1020160/ >=20 > Remove hard-coded ECC parameters since the patch above can autoset them. > http://patchwork.ozlabs.org/patch/1026638/ >=20 > Maybe those can help. I can confirm that that the commit 5346c31e305a37d39f535cc0d5ae87d8b7e81230 broke booting from NAND for my i.MX6ULL board, so I sticked with version 2018.05. Now, I've tested U-Boot 2019.01 with the three patches Adam suggested and the SPL loader is able to boot from NAND again. J=C3=B6rg