summaryrefslogtreecommitdiffstats
path: root/drivers/nand/nand_base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nand/nand_base.c')
-rw-r--r--drivers/nand/nand_base.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c
index 6b13c4e0e3..851df1176d 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))
@@ -2408,7 +2408,9 @@ int nand_scan (struct mtd_info *mtd, int maxchips)
}
if (!nand_flash_ids[i].name) {
+#ifndef CFG_NAND_QUIET_TEST
printk (KERN_WARNING "No NAND device found!!!\n");
+#endif
this->select_chip(mtd, -1);
return 1;
}
OpenPOWER on IntegriCloud