@@ -25,7 +25,6 @@
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mtd/partitions.h>
-#include <linux/nmi.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include "gpmi-nand.h"
@@ -1093,25 +1092,6 @@ static int gpmi_ecc_read_page_data(struct nand_chip *chip,
return max_bitflips;
}
-static void gpmi_wait_status_ready(struct mtd_info *mtd, unsigned long timeo)
-{
- register struct nand_chip *chip = mtd_to_nand(mtd);
- int ret;
-
- timeo = jiffies + msecs_to_jiffies(timeo);
- do {
- u8 status;
-
- ret = nand_read_data_op(chip, &status, sizeof(status), true);
- if (ret)
- return;
-
- if (status & NAND_STATUS_READY)
- break;
- touch_softlockup_watchdog();
- } while (time_before(jiffies, timeo));
-};
-
/**
* gpmi_nand_command - Send command to NAND device
* @mtd: MTD device structure
@@ -1212,18 +1192,6 @@ static void gpmi_nand_command(struct mtd_info *mtd, unsigned int command,
}
break;
- case NAND_CMD_RESET:
- if (chip->dev_ready)
- break;
- udelay(chip->chip_delay);
- chip->cmd_ctrl(mtd, NAND_CMD_STATUS,
- NAND_NCE | NAND_CLE | NAND_CTRL_CHANGE);
- chip->cmd_ctrl(mtd, NAND_CMD_NONE,
- NAND_NCE | NAND_CTRL_CHANGE);
- /* EZ-NAND can take upto 250ms as per ONFi v4.0 */
- gpmi_wait_status_ready(mtd, 250);
- return;
-
case NAND_CMD_RNDOUT:
if (is_lp) {
/* No ready / busy check necessary */
@@ -1254,14 +1222,6 @@ static void gpmi_nand_command(struct mtd_info *mtd, unsigned int command,
/* Read commands must wait */
break;
}
- /*
- * If we don't have access to the busy pin, we apply the given command
- * delay.
- */
- if (!chip->dev_ready) {
- udelay(chip->chip_delay);
- return;
- }
/*
* Apply this short delay always to ensure that we do wait tWB in