mtd/drivers/mtd/nand diskonchip.c,1.48,1.49

gleixner at infradead.org gleixner at infradead.org
Tue Feb 22 16:48:25 EST 2005


Update of /home/cvs/mtd/drivers/mtd/nand
In directory phoenix.infradead.org:/tmp/cvs-serv27836

Modified Files:
	diskonchip.c 
Log Message:
Wait for the command to finish. Do not use the ready function here, as it might hang for ever. The result will show, whether the chip is there or not

Index: diskonchip.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/diskonchip.c,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- diskonchip.c	31 Jan 2005 22:22:21 -0000	1.48
+++ diskonchip.c	22 Feb 2005 21:48:21 -0000	1.49
@@ -410,7 +410,12 @@
 	doc200x_hwcontrol(mtd, NAND_CTL_SETALE);
 	this->write_byte(mtd, 0);
 	doc200x_hwcontrol(mtd, NAND_CTL_CLRALE);
-
+	
+	/* We cant' use dev_ready here, but at least we wait for the
+	 * command to complete 
+	 */
+	udelay(50);
+	
 	ret = this->read_byte(mtd) << 8;
 	ret |= this->read_byte(mtd);
 
@@ -429,6 +434,8 @@
 		doc2000_write_byte(mtd, 0);
 		doc200x_hwcontrol(mtd, NAND_CTL_CLRALE);
 
+		udelay(50);
+
 		ident.dword = readl(docptr + DoC_2k_CDSN_IO);
 		if (((ident.byte[0] << 8) | ident.byte[1]) == ret) {
 			printk(KERN_INFO "DiskOnChip 2000 responds to DWORD access\n");





More information about the linux-mtd-cvs mailing list