/* See page 86 of the data sheet for details.  */
static void deplete(struct mtd_info *mtd, int chip)
/* See page 86 of the data sheet for details.  */
static void deplete(struct mtd_info *mtd, int chip)
{
	struct nand_chip *this = mtd->priv;
	while (!this->dev_ready(mtd)) ;
	this->select_chip(mtd, chip);
	this->cmdfunc(mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0000);
	this->cmdfunc(mtd, NAND_CMD_DEPLETE2, -1, -1);
	this->cmdfunc(mtd, NAND_CMD_DEPLETE1, 0x0000, 0x0004);
	this->cmdfunc(mtd, NAND_CMD_DEPLETE2, -1, -1);
}