/**
* nand_wait_ready - [GENERIC] Wait for the ready pin after commands.
- * @mtd: MTD device structure
+ * @chip: NAND chip object
*
* Wait for the ready pin after a command, and warn if a timeout occurs.
*/
-void nand_wait_ready(struct mtd_info *mtd)
+void nand_wait_ready(struct nand_chip *chip)
{
- struct nand_chip *chip = mtd_to_nand(mtd);
+ struct mtd_info *mtd = nand_to_mtd(chip);
unsigned long timeo = 400;
if (in_interrupt() || oops_in_progress)
*/
ndelay(100);
- nand_wait_ready(mtd);
+ nand_wait_ready(chip);
}
static void nand_ccs_delay(struct nand_chip *chip)
*/
ndelay(100);
- nand_wait_ready(mtd);
+ nand_wait_ready(chip);
}
/**
if (!chip->dev_ready)
udelay(chip->chip_delay);
else
- nand_wait_ready(nand_to_mtd(chip));
+ nand_wait_ready(chip);
return 0;
}
}
/* Internal helper for board drivers which need to override command function */
-void nand_wait_ready(struct mtd_info *mtd);
+void nand_wait_ready(struct nand_chip *chip);
/* The maximum number of NAND chips in an array */
#define NAND_MAX_CHIPS 8