aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/mtd/nand.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 2fd85d55803d..daacde5132fe 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -233,16 +233,23 @@ struct nand_hw_control {
233 * @steps: number of ecc steps per page 233 * @steps: number of ecc steps per page
234 * @size: data bytes per ecc step 234 * @size: data bytes per ecc step
235 * @bytes: ecc bytes per step 235 * @bytes: ecc bytes per step
236 * @total: total number of ecc bytes per page
237 * @prepad: padding information for syndrome based ecc generators
238 * @postpad: padding information for syndrome based ecc generators
236 * @hwctl: function to control hardware ecc generator. Must only 239 * @hwctl: function to control hardware ecc generator. Must only
237 * be provided if an hardware ECC is available 240 * be provided if an hardware ECC is available
238 * @calculate: function for ecc calculation or readback from ecc hardware 241 * @calculate: function for ecc calculation or readback from ecc hardware
239 * @correct: function for ecc correction, matching to ecc generator (sw/hw) 242 * @correct: function for ecc correction, matching to ecc generator (sw/hw)
243 * @write_page: function to write a page according to the ecc generator requirements
240 */ 244 */
241struct nand_ecc_ctrl { 245struct nand_ecc_ctrl {
242 nand_ecc_modes_t mode; 246 nand_ecc_modes_t mode;
243 int steps; 247 int steps;
244 int size; 248 int size;
245 int bytes; 249 int bytes;
250 int total;
251 int prepad;
252 int postpad;
246 void (*hwctl)(struct mtd_info *mtd, int mode); 253 void (*hwctl)(struct mtd_info *mtd, int mode);
247 int (*calculate)(struct mtd_info *mtd, 254 int (*calculate)(struct mtd_info *mtd,
248 const uint8_t *dat, 255 const uint8_t *dat,
@@ -250,6 +257,12 @@ struct nand_ecc_ctrl {
250 int (*correct)(struct mtd_info *mtd, uint8_t *dat, 257 int (*correct)(struct mtd_info *mtd, uint8_t *dat,
251 uint8_t *read_ecc, 258 uint8_t *read_ecc,
252 uint8_t *calc_ecc); 259 uint8_t *calc_ecc);
260 int (*read_page)(struct mtd_info *mtd,
261 struct nand_chip *chip,
262 uint8_t *buf);
263 int (*write_page)(struct mtd_info *mtd,
264 struct nand_chip *chip,
265 uint8_t *buf, int cached);
253}; 266};
254 267
255/** 268/**