diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-10-01 12:20:09 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2020-12-10 22:37:30 +0100 |
commit | 6b0c3b84156125e029956e46d2b44e72f513a9fa (patch) | |
tree | 24fc24dfaa088df14388aac0050d03268f45b641 /include/linux/mtd | |
parent | c8efe010283ae0bef8593211e39bf7e7e185b93e (diff) |
mtd: nand: Add helpers to manage ECC engines and configurations
Add the logic in the NAND core to find the right ECC engine depending
on the NAND chip requirements and the user desires. Right now, the
choice may be made between (more will come):
* software Hamming
* software BCH
* on-die (SPI-NAND devices only)
Once the ECC engine has been found, the ECC engine must be
configured.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-2-miquel.raynal@bootlin.com
Diffstat (limited to 'include/linux/mtd')
-rw-r--r-- | include/linux/mtd/nand.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index 6c6f91c03c42..414f8a4d2853 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h @@ -936,6 +936,10 @@ bool nanddev_isreserved(struct nand_device *nand, const struct nand_pos *pos); int nanddev_erase(struct nand_device *nand, const struct nand_pos *pos); int nanddev_markbad(struct nand_device *nand, const struct nand_pos *pos); +/* ECC related functions */ +int nanddev_ecc_engine_init(struct nand_device *nand); +void nanddev_ecc_engine_cleanup(struct nand_device *nand); + /* BBT related functions */ enum nand_bbt_block_status { NAND_BBT_BLOCK_STATUS_UNKNOWN, |