summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-12-07 16:40:42 -0800
committerJohn Stultz <john.stultz@linaro.org>2011-12-07 20:33:37 -0800
commit4dc6adbb252924aa07177ae7797bbd182175b636 (patch)
tree6c2c6e0db19e29a13e14773c46354f5bdc9fdf31
parent50885e6d8cc9491a2932e977e1a2f98946e7132a (diff)
mtd: nand: Revert naieve panic_write support
Revert commit f156594d0e2cedf7622034ded8414afb6003f5e0 as it doesn't build. Signed-off-by: John Stultz <john.stultz@linaro.org>
-rw-r--r--drivers/mtd/nand/nand_base.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 44c1edb6943..3ed9c5e4d34 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -3223,44 +3223,6 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
}
EXPORT_SYMBOL(nand_scan_ident);
-static void nand_panic_wait(struct mtd_info *mtd)
-{
- struct nand_chip *chip = mtd->priv;
- int i;
-
- if (chip->state != FL_READY)
- for (i = 0; i < 40; i++) {
- if (chip->dev_ready(mtd))
- break;
- mdelay(10);
- }
- chip->state = FL_READY;
-}
-
-static int nand_panic_write(struct mtd_info *mtd, loff_t to, size_t len,
- size_t *retlen, const u_char *buf)
-{
- struct nand_chip *chip = mtd->priv;
- int ret;
-
- /* Do not allow reads past end of device */
- if ((to + len) > mtd->size)
- return -EINVAL;
- if (!len)
- return 0;
-
- nand_panic_wait(mtd);
-
- chip->ops.len = len;
- chip->ops.datbuf = (uint8_t *)buf;
- chip->ops.oobbuf = NULL;
-
- ret = nand_do_write_ops(mtd, to, &chip->ops);
-
- *retlen = chip->ops.retlen;
- return ret;
-}
-
/**
* nand_scan_tail - [NAND Interface] Scan for the NAND device
@@ -3506,7 +3468,6 @@ int nand_scan_tail(struct mtd_info *mtd)
mtd->panic_write = panic_nand_write;
mtd->read_oob = nand_read_oob;
mtd->write_oob = nand_write_oob;
- mtd->panic_write = nand_panic_write;
mtd->sync = nand_sync;
mtd->lock = NULL;
mtd->unlock = NULL;