summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorMiquel Raynal <miquel.raynal@bootlin.com>2020-09-30 17:41:08 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2020-12-10 22:37:30 +0100
commitda429b9615803b6f19e5734c4c4d99136e1e3bfd (patch)
tree79e73655c77b620cd016c45e7a18ef7b5343cb62 /drivers/mtd
parentmtd: spinand: Instantiate a SPI-NAND on-die ECC engine (diff)
downloadlinux-da429b9615803b6f19e5734c4c4d99136e1e3bfd.tar.xz
linux-da429b9615803b6f19e5734c4c4d99136e1e3bfd.zip
mtd: nand: Let on-die ECC engines be retrieved from the NAND core
Before making use of the ECC engines, we must retrieve them. Add the necessary boilerplate. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20200930154109.3922-5-miquel.raynal@bootlin.com
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/nand/ecc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mtd/nand/ecc.c b/drivers/mtd/nand/ecc.c
index 57bc8c5ef08c..9afdde70824a 100644
--- a/drivers/mtd/nand/ecc.c
+++ b/drivers/mtd/nand/ecc.c
@@ -605,6 +605,12 @@ struct nand_ecc_engine *nand_ecc_get_sw_engine(struct nand_device *nand)
}
EXPORT_SYMBOL(nand_ecc_get_sw_engine);
+struct nand_ecc_engine *nand_ecc_get_on_die_hw_engine(struct nand_device *nand)
+{
+ return nand->ecc.ondie_engine;
+}
+EXPORT_SYMBOL(nand_ecc_get_on_die_hw_engine);
+
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>");
MODULE_DESCRIPTION("Generic ECC engine");