Skip to content

Commit

Permalink
mtd: nand: mxic-ecc: Add Macronix external ECC engine support
Browse files Browse the repository at this point in the history
Some SPI-NAND chips do not support on-die ECC. For these chips,
correction must apply on the SPI controller end. In order to avoid
doing all the calculations by software, Macronix provides a specific
engine that can offload the intensive work.

Add Macronix ECC engine support, this engine can work in conjunction
with a SPI controller and a raw NAND controller, it can be pipelined
or external and supports linear and syndrome layouts.

Right now the simplest configuration is supported: SPI controller
external and linear ECC engine.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-15-miquel.raynal@bootlin.com
  • Loading branch information
Miquel Raynal committed Feb 9, 2022
1 parent cda32a6 commit 48e6633
Show file tree
Hide file tree
Showing 3 changed files with 702 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/mtd/nand/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ config MTD_NAND_ECC_SW_BCH
ECC codes. They are used with NAND devices requiring more than 1 bit
of error correction.

config MTD_NAND_ECC_MXIC
bool "Macronix external hardware ECC engine"
select MTD_NAND_ECC
help
This enables support for the hardware ECC engine from Macronix.

endmenu

endmenu
1 change: 1 addition & 0 deletions drivers/mtd/nand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ obj-y += spi/
nandcore-$(CONFIG_MTD_NAND_ECC) += ecc.o
nandcore-$(CONFIG_MTD_NAND_ECC_SW_HAMMING) += ecc-sw-hamming.o
nandcore-$(CONFIG_MTD_NAND_ECC_SW_BCH) += ecc-sw-bch.o
nandcore-$(CONFIG_MTD_NAND_ECC_MXIC) += ecc-mxic.o
Loading

0 comments on commit 48e6633

Please sign in to comment.