/* Check NAND status to see if it is ready or not */
static int nand_dev_ready(struct mtd_info *mtd)
/* Check NAND status to see if it is ready or not */
static int nand_dev_ready(struct mtd_info *mtd)
{
	struct nand_chip *chip = mtd_to_nand(mtd);
	int reg_val;
	struct nand_drv *info;
	info = (struct nand_drv *)nand_get_controller_data(chip);
	reg_val = readl(&info->reg->status);
	if (reg_val & STATUS_RBSY0)
		return 1;
	else
		return 0;
}