/* returns: 0 on busy or 1 on ready state  */
static int zynq_nand_device_ready(struct mtd_info *mtd)
/* returns: 0 on busy or 1 on ready state  */
static int zynq_nand_device_ready(struct mtd_info *mtd)
{
	u32 csr_val;
	csr_val = readl(&zynq_nand_smc_base->csr);
	if (csr_val & ZYNQ_MEMC_SR_RAW_INT_ST1) {
		writel(ZYNQ_MEMC_SR_INT_ST1, &zynq_nand_smc_base->cfr);
		return 1;
	}
	return 0;
}