]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mtd: rawnand: mxc: support software ECC
authorSascha Hauer <s.hauer@pengutronix.de>
Wed, 22 May 2024 05:39:53 +0000 (07:39 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 1 Jul 2024 09:51:39 +0000 (11:51 +0200)
commit726005052d2a8e8e2afa6a8cb1973d10d449964c
tree246e560883e52e1d209ff2dafba248ab5ca93d09
parentd3dfbae6d4adee33deb804d28d10045878974471
mtd: rawnand: mxc: support software ECC

With these changes the driver can be used with software BCH ECC which
is useful for NAND chips that require a stronger ECC than the i.MX
hardware supports.

The controller normally interleaves user data with OOB data when
accessing the NAND chip. With Software BCH ECC we write the data
to the NAND in a way that the raw data on the NAND chip matches the
way the NAND layer sees it. This way commands like NAND_CMD_RNDOUT
work as expected.

This was tested on i.MX27 but should work on the other SoCs supported
by this driver as well.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240522-mtd-nand-mxc-nand-exec-op-v4-3-75b611e0ac44@pengutronix.de
drivers/mtd/nand/raw/mxc_nand.c