"Read-only file system" error while writing

Stuart Menefy stuart.menefy at st.com
Thu Aug 1 18:37:10 EDT 2002


Stephen

This is slightly different from what I see with the bottom version of the device:

Number of erase regions: 2
Vendor 00000020 id 000000bb
Detected STM M28W320CB, applying CFI fixups
Primary Vendor Command Set: 0003 (Intel/Sharp Standard)
Primary Algorithm Table at 0035
Alternative Vendor Command Set: 0000 (None)
No Alternate Algorithm Table
Vcc Minimum:  2.7 V
Vcc Maximum:  3.6 V
Vpp Minimum: 11.4 V
Vpp Maximum: 12.6 V
Typical byte/word write timeout: 16 µs
Maximum byte/word write timeout: 256 µs
Full buffer write not supported
Typical block erase timeout: 1024 µs
Maximum block erase timeout: 8192 µs
Chip erase not supported
Device size: 0x400000 bytes (4 MiB)
Flash Device Interface description: 0x0001
  - x16-only asynchronous interface
Max. bytes in buffer write: 0x1
Number of Erase Block Regions: 2
  Erase Region #0: BlockSize 0x2000 bytes, 8 blocks
  Erase Region #1: BlockSize 0x10000 bytes, 63 blocks

In particular the buffer write is detected as not supported.

Try this variant of the patch I'm using:

diff -u -r1.66 cfi_probe.c
--- cfi_probe.c	2 Oct 2001 15:05:12 -0000	1.66
+++ cfi_probe.c	1 Aug 2002 22:31:11 -0000
@@ -147,6 +145,28 @@
 		((unsigned char *)cfi->cfiq)[i] = cfi_read_query(map,base + (0x10 + i)*ofs_factor);
 	}
 	
+	/* The STMicroelectronics M28W320C[BT] devices report incorrect CFI data.
+	 * Check here and fix up if necessary.
+	 */
+#define VENDOR_STMICROELECTRONICS 0x0020
+#define DEVICE_M28W320CT 0xba
+#define DEVICE_M28W320CB 0xbb
+	{
+		unsigned int vendor, id;
+		vendor = cfi_read_query(map,base + 0*ofs_factor);
+		id     = cfi_read_query(map,base + 1*ofs_factor);
+printk("Vendor %08x id %08x\n", vendor, id);
+		if ((vendor == VENDOR_STMICROELECTRONICS) && (id == DEVICE_M28W320CT)) {
+			printk("Detected STM M28W320CT, applying CFI fixups\n");
+			((unsigned char*)cfi->cfiq)[0x20 - 0x10] = 0x0;
+			((unsigned char*)cfi->cfiq)[0x24 - 0x10] = 0x0;
+		}
+		if ((vendor == VENDOR_STMICROELECTRONICS) && (id == DEVICE_M28W320CB)) {
+			printk("Detected STM M28W320CB, applying CFI fixups\n");
+			((unsigned char*)cfi->cfiq)[0x31 - 0x10] = 0x3e;
+		}
+	}
+
 	/* Do any necessary byteswapping */
 	cfi->cfiq->P_ID = le16_to_cpu(cfi->cfiq->P_ID);
 	

This is not intended as a permanent fix, just to see if it fixes the problem.

Stuart


On Thu, 1 Aug 2002 14:45:45 -0500
gromit1463 at mailworks.org wrote:

> Number of erase regions: 2 
> Vendor 00000020 id 000000ba 
> Primary Vendor Command Set: 0003 (Intel/Sharp Standard) 
> Primary Algorithm Table at 0035 
> Alternative Vendor Command Set: 0000 (None) 
> No Alternate Algorithm Table 
> Vcc Minimum: 2.7 V 
> Vcc Maximum: 3.6 V 
> Vpp Minimum: b.4 V 
> Vpp Maximum: c.6 V 
> Typical byte/word write timeout: 16 s 
> Maximum byte/word write timeout: 512 s 
> Typical full buffer write timeout: 16 s 
> Maximum full buffer write timeout: 512 s 
> Typical block erase timeout: 1024 s 
> Maximum block erase timeout: 8192 s 
> Chip erase not supported 
> Device size: 0x400000 bytes (4 Mb) 
> Flash Device Interface description: 0x0001 
> x16-only asynchronous interface 
> Max. bytes in buffer write: 0x4 
> Number of Erase Block Regions: 2 
> Erase Region #0: BlockSize 0x10000 bytes, 63 blocks 
> Erase Region #1: BlockSize 0x2000 bytes, 8 blocks 
> 
> 
> 
> I have 8 chips total, 4MB each.
> 
> 
> On Thu, 2002-08-01 at 13:26, Stuart Menefy wrote:
> > Try building cfi_probe.c with DEBUG_CFI set, and post what it reports.
> 
> 
> -- 
> "Find out what you've been missing while you've been
> rebooting Windows NT." -- Infoworld on Linux
> 
> http://www.ao.com/~regan/penguins/tux.html
> 
> 
> ______________________________________________________
> Linux MTD discussion mailing list
> http://lists.infradead.org/mailman/listinfo/linux-mtd/


-- 
Stuart Menefy                                        stuart.menefy at st.com
STMicroelectronics Ltd                         ST Intranet: mo.bri.st.com
Bristol, UK                         Rest of the World: www.linuxsh.st.com




More information about the linux-mtd mailing list