aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r--include/linux/mtd/nand.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index cd4fe9ae8622..2bcbcc896835 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -235,6 +235,8 @@ struct nand_hw_control {
235 * be provided if an hardware ECC is available 235 * be provided if an hardware ECC is available
236 * @calculate: function for ecc calculation or readback from ecc hardware 236 * @calculate: function for ecc calculation or readback from ecc hardware
237 * @correct: function for ecc correction, matching to ecc generator (sw/hw) 237 * @correct: function for ecc correction, matching to ecc generator (sw/hw)
238 * @read_page_raw: function to read a raw page without ECC
239 * @write_page_raw: function to write a raw page without ECC
238 * @read_page: function to read a page according to the ecc generator requirements 240 * @read_page: function to read a page according to the ecc generator requirements
239 * @write_page: function to write a page according to the ecc generator requirements 241 * @write_page: function to write a page according to the ecc generator requirements
240 * @read_oob: function to read chip OOB data 242 * @read_oob: function to read chip OOB data
@@ -256,6 +258,12 @@ struct nand_ecc_ctrl {
256 int (*correct)(struct mtd_info *mtd, uint8_t *dat, 258 int (*correct)(struct mtd_info *mtd, uint8_t *dat,
257 uint8_t *read_ecc, 259 uint8_t *read_ecc,
258 uint8_t *calc_ecc); 260 uint8_t *calc_ecc);
261 int (*read_page_raw)(struct mtd_info *mtd,
262 struct nand_chip *chip,
263 uint8_t *buf);
264 void (*write_page_raw)(struct mtd_info *mtd,
265 struct nand_chip *chip,
266 const uint8_t *buf);
259 int (*read_page)(struct mtd_info *mtd, 267 int (*read_page)(struct mtd_info *mtd,
260 struct nand_chip *chip, 268 struct nand_chip *chip,
261 uint8_t *buf); 269 uint8_t *buf);
@@ -344,6 +352,7 @@ struct nand_buffers {
344 * @priv: [OPTIONAL] pointer to private chip date 352 * @priv: [OPTIONAL] pointer to private chip date
345 * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks 353 * @errstat: [OPTIONAL] hardware specific function to perform additional error status checks
346 * (determine if errors are correctable) 354 * (determine if errors are correctable)
355 * @write_page [REPLACEABLE] High-level page write function
347 */ 356 */
348 357
349struct nand_chip { 358struct nand_chip {
@@ -366,6 +375,8 @@ struct nand_chip {
366 void (*erase_cmd)(struct mtd_info *mtd, int page); 375 void (*erase_cmd)(struct mtd_info *mtd, int page);
367 int (*scan_bbt)(struct mtd_info *mtd); 376 int (*scan_bbt)(struct mtd_info *mtd);
368 int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page); 377 int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state, int status, int page);
378 int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
379 const uint8_t *buf, int page, int cached, int raw);
369 380
370 int chip_delay; 381 int chip_delay;
371 unsigned int options; 382 unsigned int options;