Hi Renaud, On Fri, Oct 18, 2019 at 03:09:00PM +0000, Barbier, Renaud wrote: > Looking at the Linux nand_ecc, there is something specific for512 bytes size ecc: > > if (eccsize_mult == 2 && (i & 0x4) == 0) > rp16 ^= tmppar; > > code[2] = > + (invparity[par & 0xf0] << 7) | > + (invparity[par & 0x0f] << 6) | > + (invparity[par & 0xcc] << 5) | > + (invparity[par & 0x33] << 4) | > + (invparity[par & 0xaa] << 3) | > + (invparity[par & 0x55] << 2) | > + (invparity[rp17] << 1) | > + (invparity[rp16] << 0); > > In barebox we have: > ecc_code[2] = ((~reg1) << 2) | 0x03; > > So I guess there is a small change to do to support 512 bytes. What we have in barebox currently seems to be the nand_ecc.c version of Linux-2.6.25. A git log of that file from v2.6.25 to master has: 260dc003e9fd mtd: nand: fix 512 byte software ecc support So yes, we do not seem to have 512 byte software ecc support. I'd say just update nand_ecc.c to a recent Kernel version. Sascha -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox