diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-11-27 22:49:11 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2006-11-27 22:49:11 +0100 |
commit | a5bfa2726bfb3811e18d9d1043a4876a5595eec3 (patch) | |
tree | 88a2af299f5ecd67700021b79c3e16d772913e2f /drivers/nand/nand_base.c | |
parent | f7214cf9ea71d1672b209bebba84186e549967ee (diff) | |
parent | 15784862857c3c2214498defcfed84ff137fb81e (diff) | |
download | u-boot-imx-a5bfa2726bfb3811e18d9d1043a4876a5595eec3.zip u-boot-imx-a5bfa2726bfb3811e18d9d1043a4876a5595eec3.tar.gz u-boot-imx-a5bfa2726bfb3811e18d9d1043a4876a5595eec3.tar.bz2 |
Merge with /home/sr/git/u-boot/nand-timeout
Diffstat (limited to 'drivers/nand/nand_base.c')
-rw-r--r-- | drivers/nand/nand_base.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index b7a5d32..8237f4a 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -838,9 +838,9 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state) unsigned long timeo; if (state == FL_ERASING) - timeo = CFG_HZ * 400; + timeo += (HZ * 400) / 1000; else - timeo = CFG_HZ * 20; + timeo += (HZ * 20) / 1000; if ((state == FL_ERASING) && (this->options & NAND_IS_AND)) this->cmdfunc(mtd, NAND_CMD_STATUS_MULTI, -1, -1); @@ -852,8 +852,8 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state) while (1) { if (get_timer(0) > timeo) { printf("Timeout!"); - return 0; - } + return 0x01; + } if (this->dev_ready) { if (this->dev_ready(mtd)) |