]> Gentwo Git Trees - linux/.git/commit
mtd: nand: realtek-ecc: Add Realtek external ECC engine support
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Fri, 19 Sep 2025 07:52:01 +0000 (03:52 -0400)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Mon, 29 Sep 2025 15:54:33 +0000 (17:54 +0200)
commit3148d0e5b1c5733d69ec51b70c8280e46488750a
treee56b5ab6cd68d457d448ac7990885af6aa3b0c0a
parent12bfcb84dc0852c97baff9ac1c0292a9db90c367
mtd: nand: realtek-ecc: Add Realtek external ECC engine support

The Realtek RTl93xx switch SoC series has a built in ECC controller
that can provide BCH6 or BCH12 over 512 data and 6 tag bytes. It
generates 10 (BCH6) or 20 (BCH12) bytes of parity.

This engine will most likely work in conjunction with the Realtek
spi-mem based NAND controller but can work on its own. Therefore
the initial implementation will be of type external.

Remark! The engine can support any data blocks that are multiples
of 512 bytes. For now limit it to data+oob layouts that have been
analyzed from existing devices. This way it keeps compatibility
and pre-existing vendor data can be read.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile
drivers/mtd/nand/ecc-realtek.c [new file with mode: 0644]