aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/ndfc.c
diff options
context:
space:
mode:
authorHuang Shijie <shijie8@gmail.com>2012-08-14 22:38:45 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-09-29 10:00:46 -0400
commit657f28f8811c92724db10d18bbbec70d540147d6 (patch)
tree1d8cb32d57eec27f46a74cad73a1ceff43f5e099 /drivers/mtd/nand/ndfc.c
parent8da28681eb1430fb6715c7aef67001acfbbbcba5 (diff)
mtd: kill MTD_NAND_VERIFY_WRITE
Just as Artem suggested: "Both UBI and JFFS2 are able to read verify what they wrote already. There are also MTD tests which do this verification. So I think there is no reason to keep this in the NAND layer, let alone wasting RAM in the driver to support this feature. Besides, it does not work for sub-pages and many drivers have it broken. It hurts more than it provides benefits." So kill MTD_NAND_VERIFY_WRITE entirely. Signed-off-by: Huang Shijie <shijie8@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/ndfc.c')
-rw-r--r--drivers/mtd/nand/ndfc.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 2b6f632cf274..5fd3f010e3ae 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -140,18 +140,6 @@ static void ndfc_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
140 out_be32(ndfc->ndfcbase + NDFC_DATA, *p++); 140 out_be32(ndfc->ndfcbase + NDFC_DATA, *p++);
141} 141}
142 142
143static int ndfc_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
144{
145 struct nand_chip *chip = mtd->priv;
146 struct ndfc_controller *ndfc = chip->priv;
147 uint32_t *p = (uint32_t *) buf;
148
149 for(;len > 0; len -= 4)
150 if (*p++ != in_be32(ndfc->ndfcbase + NDFC_DATA))
151 return -EFAULT;
152 return 0;
153}
154
155/* 143/*
156 * Initialize chip structure 144 * Initialize chip structure
157 */ 145 */
@@ -172,7 +160,6 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
172 chip->controller = &ndfc->ndfc_control; 160 chip->controller = &ndfc->ndfc_control;
173 chip->read_buf = ndfc_read_buf; 161 chip->read_buf = ndfc_read_buf;
174 chip->write_buf = ndfc_write_buf; 162 chip->write_buf = ndfc_write_buf;
175 chip->verify_buf = ndfc_verify_buf;
176 chip->ecc.correct = nand_correct_data; 163 chip->ecc.correct = nand_correct_data;
177 chip->ecc.hwctl = ndfc_enable_hwecc; 164 chip->ecc.hwctl = ndfc_enable_hwecc;
178 chip->ecc.calculate = ndfc_calculate_ecc; 165 chip->ecc.calculate = ndfc_calculate_ecc;