diff options
Diffstat (limited to 'drivers/nand/nand_base.c')
| -rw-r--r-- | drivers/nand/nand_base.c | 16 | 
1 files changed, 11 insertions, 5 deletions
| diff --git a/drivers/nand/nand_base.c b/drivers/nand/nand_base.c index 9ec5af9d7..b039c3cd8 100644 --- a/drivers/nand/nand_base.c +++ b/drivers/nand/nand_base.c @@ -71,6 +71,7 @@  #endif  #include <common.h> +#ifdef CONFIG_NEW_NAND_CODE  #if (CONFIG_COMMANDS & CFG_CMD_NAND) @@ -847,11 +848,13 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)  	else  		this->cmdfunc(mtd, NAND_CMD_STATUS, -1, -1); -	reset_timer_masked(); +	reset_timer();  	while (1) { -		if (get_timer_masked() > timeo) +		if (get_timer(0) > timeo) { +			printf("Timeout!");  			return 0; +			}  		if (this->dev_ready) {  			if (this->dev_ready(mtd)) @@ -862,6 +865,10 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)  		}  	} +	/* XXX nand device 1 on dave (PPChameleonEVB) needs more time */ +	reset_timer(); +	while (get_timer(0) < 10); +  	return this->read_byte(mtd);  }  #endif @@ -2393,9 +2400,6 @@ int nand_scan (struct mtd_info *mtd, int maxchips)  			if (nand_manuf_ids[j].id == nand_maf_id)  				break;  		} -		printk (KERN_INFO "NAND device: Manufacturer ID:" -			" 0x%02x, Chip ID: 0x%02x (%s %s)\n", nand_maf_id, nand_dev_id, -			nand_manuf_ids[j].name , nand_flash_ids[i].name);  		break;  	} @@ -2656,3 +2660,5 @@ void nand_release (struct mtd_info *mtd)  }  #endif +#endif /* CONFIG_NEW_NAND_CODE */ + |