mtd: nand: Wait for PAGEPROG to finish in drivers setting NAND_ECC_CUSTOM_PAGE_ACCESS
[oweals/u-boot.git] / drivers / mtd / nand / davinci_nand.c
index 2a01fd34e91e826b6029899a7ce3d5750c1387d8..65104c6cf483ed822ff832d59b3a60bdce5bc999 100644 (file)
@@ -358,13 +358,12 @@ static struct nand_ecclayout nand_keystone_rbl_4bit_layout_oobfirst = {
  * @buf: the data to write
  * @oob_required: must write chip->oob_poi to OOB
  * @page: page number to write
- * @cached: cached programming
  * @raw: use _raw version of write_page
  */
 static int nand_davinci_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)
+                                  int page, int raw)
 {
        int status;
        int ret = 0;
@@ -395,13 +394,6 @@ static int nand_davinci_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) {
                ret = -EIO;
                goto err;