mtd/drivers/mtd/chips cfi_cmdset_0001.c, 1.155, 1.156 fwh_lock.h, 1.1, 1.2 jedec_probe.c, 1.56, 1.57

ebiederman at lnxi.com ebiederman at lnxi.com
Fri Sep 17 07:45:09 EDT 2004


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

Modified Files:
	cfi_cmdset_0001.c fwh_lock.h jedec_probe.c 
Log Message:
- Support for the ST M50LPW080 flash chip
- Debugging support for fwh_lock.h
- Minor cleanups to amd76xrom and ichxrom


Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -r1.155 -r1.156
--- cfi_cmdset_0001.c	12 Aug 2004 06:40:22 -0000	1.155
+++ cfi_cmdset_0001.c	17 Sep 2004 11:45:05 -0000	1.156
@@ -42,6 +42,8 @@
 #define MANUFACTURER_INTEL	0x0089
 #define I82802AB	0x00ad
 #define I82802AC	0x00ac
+#define MANUFACTURER_ST         0x0020
+#define M50LPW080       0x002F
 
 static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
 //static int cfi_intelext_read_user_prot_reg (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
@@ -195,8 +197,9 @@
 };
 
 static struct cfi_fixup jedec_fixup_table[] = {
-	{ MANUFACTURER_INTEL, I82802AB, fixup_use_fwh_lock, NULL, },
-	{ MANUFACTURER_INTEL, I82802AC, fixup_use_fwh_lock, NULL, },
+	{ MANUFACTURER_INTEL, I82802AB,   fixup_use_fwh_lock, NULL, },
+	{ MANUFACTURER_INTEL, I82802AC,   fixup_use_fwh_lock, NULL, },
+	{ MANUFACTURER_ST,    M50LPW080,  fixup_use_fwh_lock, NULL, },
 	{ 0, 0, NULL, NULL }
 };
 static struct cfi_fixup fixup_table[] = {
@@ -550,9 +553,9 @@
 		return 0;
 
 	case FL_ERASING:
-		if (!(cfip->FeatureSupport & 2) ||
+		if (!cfip ||
+		    !(cfip->FeatureSupport & 2) ||
 		    !(mode == FL_READY || mode == FL_POINT ||
-		     !cfip ||
 		     (mode == FL_WRITING && (cfip->SuspendCmdSupport & 1))))
 			goto sleep;
 
@@ -1377,8 +1380,7 @@
 
 	spin_unlock(chip->mutex);
 	INVALIDATE_CACHED_RANGE(map, adr, len);
-	set_current_state(TASK_UNINTERRUPTIBLE);
-	schedule_timeout((chip->erase_time*HZ)/(2*1000));
+	msleep(chip->erase_time / 2);
 	spin_lock(chip->mutex);
 
 	/* FIXME. Use a timer to check this, and return immediately. */

Index: fwh_lock.h
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/fwh_lock.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fwh_lock.h	12 Aug 2004 06:40:23 -0000	1.1
+++ fwh_lock.h	17 Sep 2004 11:45:05 -0000	1.2
@@ -34,6 +34,9 @@
 
 	/* Refuse the operation if the we cannot look behind the chip */
 	if (chip->start < 0x400000) {
+		DEBUG( MTD_DEBUG_LEVEL3,
+			"MTD %s(): chip->start: %lx wanted >= 0x400000\n",
+			__func__, chip->start );
 		return -EIO;
 	}
 	/*

Index: jedec_probe.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/jedec_probe.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- jedec_probe.c	17 Sep 2004 07:45:05 -0000	1.56
+++ jedec_probe.c	17 Sep 2004 11:45:05 -0000	1.57
@@ -129,6 +129,7 @@
 #define M50FW040	0x002C
 #define M50FW080	0x002D
 #define M50FW016	0x002E
+#define M50LPW080       0x002F
 
 /* SST */
 #define SST29EE020	0x0010
@@ -1529,6 +1530,19 @@
 			ERASEINFO(0x10000,32),
 		}
 	}, {
+		.mfr_id		= MANUFACTURER_ST,
+		.dev_id		= M50LPW080,
+		.name		= "ST M50LPW080",
+		.uaddr		= {
+			[0] = MTD_UADDR_UNNECESSARY,    /* x8 */
+		},
+		.DevSize	= SIZE_1MiB,
+		.CmdSet		= P_ID_INTEL_EXT,
+		.NumEraseRegions= 1,
+		.regions	= {
+			ERASEINFO(0x10000,16),
+		}
+	}, {
 		.mfr_id		= MANUFACTURER_TOSHIBA,
 		.dev_id		= TC58FVT160,
 		.name		= "Toshiba TC58FVT160",





More information about the linux-mtd-cvs mailing list