No oob scheme defined for oobsize 224 on imx6ull board

jameszxj jameszxj at gmail.com
Wed Jan 6 21:27:37 EST 2021


Hi,
 
> 
> 
> ------------------ Original ------------------
> From: "Sascha Hauer" <sha at pengutronix.de>;
> Date: Wed, Jan 6, 2021 06:35 PM
> To: "郑小军"<jameszxj at gmail.com>;
> Cc: "barebox"<barebox at lists.infradead.org>;
> Subject: Re: No oob scheme defined for oobsize 224 on imx6ull board
> 
> Hi,
> 
> On Fri, Dec 18, 2020 at 05:11:11PM +0800, 郑小军 wrote:
> > Hi, all
> >     I am trying to run barebox on my i.mx6ull board.  I inherit from
> > nxp-imx6ull-evk. When I added nand flash support, system crashed. I
> > found that the pointer "chip->legacy.set_features" and
> > "chip->legacy.get_features" in nand_mxs.c was NULL.
> > I replaced it with nand_set_features() and nand_get_features().
> 
> This looks like the correct solution for this. Care to send a patch?
I have sent a patch email. My first time send a patch to barebox, so if
the format is improper, feel free to tell me.

> 
> > Barebox didn't crash again, but I get the errors:
> >         nand_base: device found, Manufacturer ID: 0x2c, Chip ID: 0xdc
> >         nand_base: Micron MT29F4G08ABAEAWP
> >         nand_base: 512 MiB, SLC, erase size: 256 KiB, page size: 4096,
> > OOB size: 224
> >         WARNING: at drivers/mtd/nand/nand_base.c:5591/nand_scan_tail()!
> >         WARNING: No oob scheme defined for oobsize 224
> >         mxs_nand 1806000.nand-controller at 1806000.of: probe failed:
> > Invalid argument
> 
> You are falling into:
> 
> /*
> * If no default placement scheme is given, select an appropriate one.
> */
> if (!mtd->ooblayout &&
>     !(ecc->mode == NAND_ECC_SOFT && ecc->algo == NAND_ECC_BCH)) {
> ...
> }
> 
> Normally mtd->ooblayout should be set at this point. the nand_mxs driver
> currently misses to set it. I think you have to adopt
> gpmi_ooblayout_ecc() and gpmi_ooblayout_free() from the Linux driver for
> barebox.
> 
> This bug seems to trigger for NANDs with bigger page sizes. I only
> tested the last NAND layer update with smaller page sizes. So it's not
> you who misses something, it's me who missed something ;)
> 
thanks, I'll try it. If it runs, I'll send another patch.

> Regards,
>   Sascha
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


More information about the barebox mailing list