提交 a5bfa272 编写于 作者: W Wolfgang Denk 提交者: Wolfgang Denk

Merge with /home/sr/git/u-boot/nand-timeout

......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册