diff -Nur linux-2.5.69-uc0/drivers/mtd/chips/Kconfig linux-2.5.x-develer/drivers/mtd/chips/Kconfig
--- linux-2.5.69-uc0/drivers/mtd/chips/Kconfig	2003-05-05 01:53:08.000000000 +0200
+++ linux-2.5.x-develer/drivers/mtd/chips/Kconfig	2003-05-18 07:19:46.000000000 +0200
@@ -147,6 +147,17 @@
 	  provides support for one of those command sets, used on chips 
 	  chips including the AMD Am29LV320.
 
+config MTD_CFI_BLOCKERASE
+	bool "Use BLOCK ERASE command"
+	depends on MTD_CFI_AMDSTD
+	default n
+	help
+	  Some flash chips such as the SST S71145, have two different erase
+	  commands, one for sectors (4KB) and one for blocks (64KB). Using
+	  larger erase units might be faster and reduce memory usage of JFFS2
+	  for such chips. Note that the chip mapping must be adjusted to
+	  reflect this change.
+
 config MTD_RAM
 	tristate "Support for RAM chips in bus mapping"
 	depends on MTD
diff -Nur linux-2.5.69-uc0/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.5.x-develer/drivers/mtd/chips/cfi_cmdset_0002.c
--- linux-2.5.69-uc0/drivers/mtd/chips/cfi_cmdset_0002.c	2003-05-05 01:53:13.000000000 +0200
+++ linux-2.5.x-develer/drivers/mtd/chips/cfi_cmdset_0002.c	2003-05-18 07:11:42.000000000 +0200
@@ -584,8 +584,12 @@
 	cfi_send_gen_cmd(0x80, cfi->addr_unlock1, chip->start, map, cfi, CFI_DEVICETYPE_X8, NULL);
 	cfi_send_gen_cmd(0xAA, cfi->addr_unlock1, chip->start, map, cfi, CFI_DEVICETYPE_X8, NULL);
 	cfi_send_gen_cmd(0x55, cfi->addr_unlock2, chip->start, map, cfi, CFI_DEVICETYPE_X8, NULL);
-	cfi_write(map, CMD(0x30), adr);
-	
+#if defined(CONFIG_MTD_CFI_BLOCKERASE)
+	cfi_write(map, CMD(0x50), adr);
+#else
+ 	cfi_write(map, CMD(0x30), adr);
+#endif
+
 	timeo = jiffies + (HZ*20);
 
 	cfi_spin_unlock(chip->mutex);
diff -Nur linux-2.5.69-uc0/drivers/mtd/chips/jedec_probe.c linux-2.5.x-develer/drivers/mtd/chips/jedec_probe.c
--- linux-2.5.69-uc0/drivers/mtd/chips/jedec_probe.c	2003-05-05 01:53:57.000000000 +0200
+++ linux-2.5.x-develer/drivers/mtd/chips/jedec_probe.c	2003-05-18 07:27:40.000000000 +0200
@@ -42,6 +42,7 @@
 /* Fujitsu */
 #define MBM29LV160TE	0x22C4
 #define MBM29LV160BE	0x2249
+#define MBM29LV800BA	0x225B
 
 /* ST - www.st.com */
 #define M29W800T	0x00D7
@@ -248,7 +249,33 @@
                           ERASEINFO(0x08000,2),
 			  ERASEINFO(0x02000,8)
                 }
-	} 
+	}, {
+		.mfr_id = MANUFACTURER_FUJITSU,
+		.dev_id = MBM29LV800BA,
+		.name = "Fujitsu MBM29LV800BA",
+		.DevSize = SIZE_1MiB,
+		.NumEraseRegions = 4,
+		.regions = {ERASEINFO(0x04000,1),
+		          ERASEINFO(0x02000,2),
+		          ERASEINFO(0x08000,1),
+		          ERASEINFO(0x10000,15),
+				 }
+	}, {
+		.mfr_id = MANUFACTURER_SST,
+		.dev_id = SST39LF160,
+		.name = "SST 39LF160",
+		.DevSize = SIZE_2MiB,
+#if CONFIG_MTD_CFI_BLOCKERASE 
+		.NumEraseRegions = 1,
+		.regions = {ERASEINFO(0x10000,32) }
+#else
+		/* Split flash in two regions to work around 256 blocks limit */
+		.NumEraseRegions = 2,
+		.regions = {ERASEINFO(0x01000,256),
+			  ERASEINFO(0x01000,256)
+		} 
+#endif
+	}
 };
 
 
@@ -293,6 +320,14 @@
 	int i;
 	int osf = cfi->interleave * cfi->device_type;
 	int retried = 0;
+	int busmask;
+
+	switch(map->buswidth) {
+	case 1:  busmask = 0xff; break;
+	case 2:  busmask = 0xffff; break;
+	case 4:  busmask = 0xffffffff; break;
+	default: printk("Unknown buswidth in jedec_probe_chip\n"); return(0);
+	}
 
 	if (!cfi->numchips) {
 		switch (cfi->device_type) {
@@ -336,8 +371,8 @@
 		cfi->id = jedec_read_id(map, base, osf);
 		
 		for (i=0; i<sizeof(jedec_table)/sizeof(jedec_table[0]); i++) {
-			if (cfi->mfr == jedec_table[i].mfr_id &&
-			    cfi->id == jedec_table[i].dev_id)
+			if (cfi->mfr == (jedec_table[i].mfr_id & busmask) &&
+			    cfi->id == (jedec_table[i].dev_id & busmask))
 				return cfi_jedec_setup(cfi, i);
 		}
 		if (!retried++) {
