#include <nand.h>
#include <asm/io.h>
-#define CONFIG_SYS_NAND_READ_DELAY \
- { volatile int dummy; int i; for (i=0; i<10000; i++) dummy = i; }
-
static int nand_ecc_pos[] = CONFIG_SYS_NAND_ECCPOS;
#if (CONFIG_SYS_NAND_PAGE_SIZE <= 512)
/*
* Wait a while for the data to be ready
*/
- if (this->dev_ready)
- while (!this->dev_ready(mtd))
- ;
- else
- CONFIG_SYS_NAND_READ_DELAY;
+ while (!this->dev_ready(mtd))
+ ;
return 0;
}
void (*hwctrl)(struct mtd_info *mtd, int cmd,
unsigned int ctrl) = this->cmd_ctrl;
- if (this->dev_ready)
- while (!this->dev_ready(mtd))
- ;
- else
- CONFIG_SYS_NAND_READ_DELAY;
+ while (!this->dev_ready(mtd))
+ ;
/* Emulate NAND_CMD_READOOB */
if (cmd == NAND_CMD_READOOB) {
/*
* Wait a while for the data to be ready
*/
- if (this->dev_ready)
- while (!this->dev_ready(mtd))
- ;
- else
- CONFIG_SYS_NAND_READ_DELAY;
+ while (!this->dev_ready(mtd))
+ ;
return 0;
}