From 657f28f8811c92724db10d18bbbec70d540147d6 Mon Sep 17 00:00:00 2001 From: Huang Shijie Date: Tue, 14 Aug 2012 22:38:45 -0400 Subject: 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- drivers/mtd/nand/lpc32xx_slc.c | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'drivers/mtd/nand/lpc32xx_slc.c') diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c index 184035045208..9326e5994b26 100644 --- a/drivers/mtd/nand/lpc32xx_slc.c +++ b/drivers/mtd/nand/lpc32xx_slc.c @@ -368,24 +368,6 @@ static void lpc32xx_nand_write_buf(struct mtd_info *mtd, const uint8_t *buf, int writel((uint32_t)*buf++, SLC_DATA(host->io_base)); } -/* - * Verify data in buffer to data on device - */ -static int lpc32xx_verify_buf(struct mtd_info *mtd, const uint8_t *buf, int len) -{ - struct nand_chip *chip = mtd->priv; - struct lpc32xx_nand_host *host = chip->priv; - int i; - - /* DATA register must be read as 32 bits or it will fail */ - for (i = 0; i < len; i++) { - if (buf[i] != (uint8_t)readl(SLC_DATA(host->io_base))) - return -EFAULT; - } - - return 0; -} - /* * Read the OOB data from the device without ECC using FIFO method */ @@ -871,7 +853,6 @@ static int __devinit lpc32xx_nand_probe(struct platform_device *pdev) chip->ecc.correct = nand_correct_data; chip->ecc.strength = 1; chip->ecc.hwctl = lpc32xx_nand_ecc_enable; - chip->verify_buf = lpc32xx_verify_buf; /* bitflip_threshold's default is defined as ecc_strength anyway. * Unfortunately, it is set only later at add_mtd_device(). Meanwhile -- cgit v1.2.3