/* omap_dev_ready - calls the platform specific dev_ready function @mtd: MTD device structure  */
static int omap_dev_ready(struct mtd_info *mtd)
/* omap_dev_ready - calls the platform specific dev_ready function @mtd: MTD device structure  */
static int omap_dev_ready(struct mtd_info *mtd)
{
	struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
							mtd);
	unsigned int val = __raw_readl(info->gpmc_baseaddr + GPMC_IRQ_STATUS);
	if ((val & 0x100) == 0x100) {
		val |= 0x100;
		val &= ~(0x0);
		__raw_writel(val, info->gpmc_baseaddr + GPMC_IRQ_STATUS);
	} else {
		unsigned int cnt = 0;
		while (cnt++ < 0x1FF) {
			if  ((val & 0x100) == 0x100)
				return 0;
			val = __raw_readl(info->gpmc_baseaddr +
							GPMC_IRQ_STATUS);
		}
	}
	return 1;
}