mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-07-26 21:03:44 +09:00
Merge with /home/sr/git/u-boot/nand-timeout
This commit is contained in:
commit
a5bfa2726b
@ -838,9 +838,9 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
|
|||||||
unsigned long timeo;
|
unsigned long timeo;
|
||||||
|
|
||||||
if (state == FL_ERASING)
|
if (state == FL_ERASING)
|
||||||
timeo = CFG_HZ * 400;
|
timeo += (HZ * 400) / 1000;
|
||||||
else
|
else
|
||||||
timeo = CFG_HZ * 20;
|
timeo += (HZ * 20) / 1000;
|
||||||
|
|
||||||
if ((state == FL_ERASING) && (this->options & NAND_IS_AND))
|
if ((state == FL_ERASING) && (this->options & NAND_IS_AND))
|
||||||
this->cmdfunc(mtd, NAND_CMD_STATUS_MULTI, -1, -1);
|
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) {
|
while (1) {
|
||||||
if (get_timer(0) > timeo) {
|
if (get_timer(0) > timeo) {
|
||||||
printf("Timeout!");
|
printf("Timeout!");
|
||||||
return 0;
|
return 0x01;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->dev_ready) {
|
if (this->dev_ready) {
|
||||||
if (this->dev_ready(mtd))
|
if (this->dev_ready(mtd))
|
||||||
|
Loading…
Reference in New Issue
Block a user