mtd/drivers/mtd/nand nand_base.c,1.91,1.92

gleixner at infradead.org gleixner at infradead.org
Fri May 28 14:20:53 EDT 2004


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

Modified Files:
	nand_base.c 
Log Message:
Remove superfluid agand-wait function. Signed-off-by: Thomas Gleixner <tglx at linutronix.de>

Index: nand_base.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/nand/nand_base.c,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -r1.91 -r1.92
--- nand_base.c	28 May 2004 18:18:04 -0000	1.91
+++ nand_base.c	28 May 2004 18:20:50 -0000	1.92
@@ -769,60 +769,6 @@
 }
 
 /**
- * agand_wait - [DEFAULT]  wait until the command is done on AG-AND
- * @mtd:	MTD device structure
- * @this:	NAND chip structure
- * @state:	state to select the max. timeout value
- *
- * Wait for command done. This applies to erase and program only
- *
-*/
-static int agand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
-{
-
-	unsigned long	timeo = jiffies;
-	int	status;
-	
-	if (state == FL_ERASING)
-		 timeo += (HZ * 400) / 1000;
-	else
-		 timeo += (HZ * 20) / 1000;
-
-	spin_lock_bh (&this->chip_lock);
-	if ((state == FL_ERASING))
-		this->cmdfunc (mtd, NAND_CMD_STATUS_MULTI, -1, -1);
-	else	
-		this->cmdfunc (mtd, NAND_CMD_STATUS, -1, -1);
-
-	while (time_before(jiffies, timeo)) {		
-		/* Check, if we were interrupted */
-		if (this->state != state) {
-			spin_unlock_bh (&this->chip_lock);
-			return 0;
-		}
-		if (this->dev_ready) {
-			if (this->dev_ready(mtd))
-				break;
-		}
-		if (state == FL_ERASING) {
-			if ((this->read_byte(mtd) & 0x61) == 0x60)
-				break;
-		} else {
-			if (this->read_byte(mtd) & 0x40)
-				break;
-		}		
-						
-		spin_unlock_bh (&this->chip_lock);
-		yield ();
-		spin_lock_bh (&this->chip_lock);
-	}
-	status = (int) this->read_byte(mtd);
-	spin_unlock_bh (&this->chip_lock);
-
-	return status;
-}
-
-/**
  * nand_write_page - [GENERIC] write one page
  * @mtd:	MTD device structure
  * @this:	NAND chip structure





More information about the linux-mtd-cvs mailing list