summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-10-29 12:30:50 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-11-06 14:08:10 +0100
commit068d7560c79f79674faf0267a319e4dc9b9bce8f (patch)
treea9108023780be87456f6be59a1f583813867296d
parent2b2fb0d1a48085ecdf7d64048e6386747486d573 (diff)
downloadbarebox-068d7560c79f79674faf0267a319e4dc9b9bce8f.tar.gz
barebox-068d7560c79f79674faf0267a319e4dc9b9bce8f.tar.xz
mtd: nand: drop unused errstat hook
chip->errstat is never set by any driver, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mtd/nand/nand_base.c15
-rw-r--r--include/linux/mtd/nand.h5
2 files changed, 0 insertions, 20 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 999d56c5b..064b36201 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2289,13 +2289,6 @@ static int nand_write_page(struct mtd_info *mtd, struct nand_chip *chip,
chip->cmdfunc(mtd, NAND_CMD_PAGEPROG, -1, -1);
status = chip->waitfunc(mtd, chip);
- /*
- * See if operation failed and additional status checks are
- * available.
- */
- if ((status & NAND_STATUS_FAIL) && (chip->errstat))
- status = chip->errstat(mtd, chip, FL_WRITING, status,
- page);
if (status & NAND_STATUS_FAIL)
return -EIO;
@@ -2750,14 +2743,6 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
status = chip->waitfunc(mtd, chip);
- /*
- * See if operation failed and additional status checks are
- * available
- */
- if ((status & NAND_STATUS_FAIL) && (chip->errstat))
- status = chip->errstat(mtd, chip, FL_ERASING,
- status, page);
-
/* See if block erase succeeded */
if (status & NAND_STATUS_FAIL) {
pr_debug("%s: failed erase, page 0x%08x\n",
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index c4bdddc61..a8a22210c 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -466,9 +466,6 @@ struct nand_buffers {
* structure which is shared among multiple independent
* devices.
* @priv: [OPTIONAL] pointer to private chip data
- * @errstat: [OPTIONAL] hardware specific function to perform
- * additional error status checks (determine if errors are
- * correctable).
* @write_page: [REPLACEABLE] High-level page write function
*/
@@ -491,8 +488,6 @@ struct nand_chip {
int page_addr);
int(*waitfunc)(struct mtd_info *mtd, struct nand_chip *this);
int (*scan_bbt)(struct mtd_info *mtd);
- int (*errstat)(struct mtd_info *mtd, struct nand_chip *this, int state,
- int status, int page);
int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip,
uint32_t offset, int data_len, const uint8_t *buf,
int oob_required, int page, int cached, int raw);