mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.171,1.172

tpoynor at infradead.org tpoynor at infradead.org
Tue Mar 29 17:06:40 EST 2005


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

Modified Files:
	cfi_cmdset_0001.c 
Log Message:
Skip jiffy delay after each block lock/unlock for Intel CFI flash with the
"Instant Individual Block Locking" feature bit set.


Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.171
retrieving revision 1.172
diff -u -r1.171 -r1.172
--- cfi_cmdset_0001.c	19 Mar 2005 22:39:49 -0000	1.171
+++ cfi_cmdset_0001.c	29 Mar 2005 22:06:37 -0000	1.172
@@ -1823,6 +1823,7 @@
 				       unsigned long adr, int len, void *thunk)
 {
 	struct cfi_private *cfi = map->fldrv_priv;
+	struct cfi_pri_intelext *extp = cfi->cmdset_priv;
 	map_word status, status_OK;
 	unsigned long timeo = jiffies + HZ;
 	int ret;
@@ -1852,9 +1853,16 @@
 	} else
 		BUG();
 
-	spin_unlock(chip->mutex);
-	UDELAY(map, chip, adr, 1000000/HZ);
-	spin_lock(chip->mutex);
+	/*
+	 * If Instant Individual Block Locking supported then no need
+	 * to delay.
+	 */
+
+	if (!extp || !(extp->FeatureSupport & (1 << 5))) {
+		spin_unlock(chip->mutex);
+		UDELAY(map, chip, adr, 1000000/HZ);
+		spin_lock(chip->mutex);
+	}
 
 	/* FIXME. Use a timer to check this, and return immediately. */
 	/* Once the state machine's known to be working I'll do that */





More information about the linux-mtd-cvs mailing list