From b5178219575c3d595f5b75f29b288c56e77a4626 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 25 May 2006 10:04:31 +0200 Subject: [PATCH] --- yaml --- r: 27885 b: refs/heads/master c: 9577f44a899cf4acb9e381c8946307b72153cd15 h: refs/heads/master i: 27883: a51bbc45920f50f7d8271a7c25bbbd9436a150eb v: v3 --- [refs] | 2 +- trunk/include/linux/mtd/nand.h | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d7759512fb97..084bea322b17 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7fac464868ec5d80019fa549b8b4516dd1dc9d5c +refs/heads/master: 9577f44a899cf4acb9e381c8946307b72153cd15 diff --git a/trunk/include/linux/mtd/nand.h b/trunk/include/linux/mtd/nand.h index 2fd85d55803d..daacde5132fe 100644 --- a/trunk/include/linux/mtd/nand.h +++ b/trunk/include/linux/mtd/nand.h @@ -233,16 +233,23 @@ struct nand_hw_control { * @steps: number of ecc steps per page * @size: data bytes per ecc step * @bytes: ecc bytes per step + * @total: total number of ecc bytes per page + * @prepad: padding information for syndrome based ecc generators + * @postpad: padding information for syndrome based ecc generators * @hwctl: function to control hardware ecc generator. Must only * be provided if an hardware ECC is available * @calculate: function for ecc calculation or readback from ecc hardware * @correct: function for ecc correction, matching to ecc generator (sw/hw) + * @write_page: function to write a page according to the ecc generator requirements */ struct nand_ecc_ctrl { nand_ecc_modes_t mode; int steps; int size; int bytes; + int total; + int prepad; + int postpad; void (*hwctl)(struct mtd_info *mtd, int mode); int (*calculate)(struct mtd_info *mtd, const uint8_t *dat, @@ -250,6 +257,12 @@ struct nand_ecc_ctrl { int (*correct)(struct mtd_info *mtd, uint8_t *dat, uint8_t *read_ecc, uint8_t *calc_ecc); + int (*read_page)(struct mtd_info *mtd, + struct nand_chip *chip, + uint8_t *buf); + int (*write_page)(struct mtd_info *mtd, + struct nand_chip *chip, + uint8_t *buf, int cached); }; /**