aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-04-29 11:06:44 +0200
committerBoris Brezillon <boris.brezillon@free-electrons.com>2017-05-15 13:18:28 +0200
commitcc0f51ec111266f5d255e753bf3254ad411d5c12 (patch)
tree539eb4b25ebc6bea5954d821a9c8326ffe676757 /include/linux/mtd/nand.h
parentmtd: nand: add core support for on-die ECC (diff)
downloadlinux-dev-cc0f51ec111266f5d255e753bf3254ad411d5c12.tar.xz
linux-dev-cc0f51ec111266f5d255e753bf3254ad411d5c12.zip
mtd: nand: export nand_{read,write}_page_raw()
The nand_read_page_raw() and nand_write_page_raw() functions might be re-used by vendor-specific implementations of the read_page/write_page functions. Instead of having vendor-specific code duplicate this code, it is much better to export those functions and allow them to be re-used. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Richard Weinberger <richard@nod.at> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Diffstat (limited to '')
-rw-r--r--include/linux/mtd/nand.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 603522097ec9..7a01d2eb7443 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -1259,6 +1259,14 @@ int nand_read_oob_std(struct mtd_info *mtd, struct nand_chip *chip, int page);
int nand_read_oob_syndrome(struct mtd_info *mtd, struct nand_chip *chip,
int page);
+/* Default read_page_raw implementation */
+int nand_read_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
+ uint8_t *buf, int oob_required, int page);
+
+/* Default write_page_raw implementation */
+int nand_write_page_raw(struct mtd_info *mtd, struct nand_chip *chip,
+ const uint8_t *buf, int oob_required, int page);
+
/* Reset and initialize a NAND device */
int nand_reset(struct nand_chip *chip, int chipnr);