diff -urP linux-2.6.6/drivers/mtd/chips/jedec_probe.c linux-2.6.6-mw1/drivers/mtd/chips/jedec_probe.c
--- linux-2.6.6/drivers/mtd/chips/jedec_probe.c	Mon May 10 04:33:21 2004
+++ linux-2.6.6-mw1/drivers/mtd/chips/jedec_probe.c	Sat May 29 16:29:20 2004
@@ -49,6 +49,8 @@
 #define AM29F040	0x00A4
 #define AM29LV040B	0x004F
 #define AM29F032B	0x0041
+#define AM29LV081	0x0038
+#define AM29LV017	0x00C8
 
 /* Atmel */
 #define AT49BV512	0x0003
@@ -415,6 +417,32 @@
 		.NumEraseRegions= 1,
 		.regions	= {
 			ERASEINFO(0x10000,8),
+		}
+	}, {
+		.mfr_id		= MANUFACTURER_AMD,
+		.dev_id		= AM29LV081,
+		.name		= "AMD AM29LV081",
+		.uaddr		= {
+			[0] = MTD_UADDR_0x0555_0x02AA /* x8 */
+		},
+		.DevSize	= SIZE_1MiB,
+		.CmdSet		= P_ID_AMD_STD,
+		.NumEraseRegions= 1,
+		.regions	= {
+			ERASEINFO(0x10000,16),
+		}
+	}, {
+		.mfr_id		= MANUFACTURER_AMD,
+		.dev_id		= AM29LV017,
+		.name		= "AMD AM29LV017",
+		.uaddr		= {
+			[0] = MTD_UADDR_0x0555_0x02AA /* x8 */
+		},
+		.DevSize	= SIZE_2MiB,
+		.CmdSet		= P_ID_AMD_STD,
+		.NumEraseRegions= 1,
+		.regions	= {
+			ERASEINFO(0x10000,32),
 		}
 	}, {
 		.mfr_id		= MANUFACTURER_ATMEL,
diff -urP linux-2.6.6/drivers/mtd/maps/Kconfig linux-2.6.6-mw1/drivers/mtd/maps/Kconfig
--- linux-2.6.6/drivers/mtd/maps/Kconfig	Mon May 10 04:33:20 2004
+++ linux-2.6.6-mw1/drivers/mtd/maps/Kconfig	Fri Jun  4 23:35:04 2004
@@ -53,6 +53,13 @@
 	  bits, you would set the bus width octect value to 4. This is
 	  used internally by the CFI drivers.
 
+config MTD_SUN_JSFLASH
+	tristate "Sun Javastation userflash support"
+	depends on SPARC32 && MTD_JEDECPROBE && MTD_COMPLEX_MAPPINGS && MTD_PARTITIONS
+	help
+	  This provides a 'mapping' driver which supports the OS-flash
+	  simm available in Sun Javastations.
+
 config MTD_SUN_UFLASH
 	tristate "Sun Microsystems userflash support"
 	depends on (SPARC32 || SPARC64) && MTD_CFI
diff -urP linux-2.6.6/drivers/mtd/maps/Makefile linux-2.6.6-mw1/drivers/mtd/maps/Makefile
--- linux-2.6.6/drivers/mtd/maps/Makefile	Mon May 10 04:31:55 2004
+++ linux-2.6.6-mw1/drivers/mtd/maps/Makefile	Wed May 26 09:54:29 2004
@@ -35,6 +35,7 @@
 obj-$(CONFIG_MTD_SC520CDP)	+= sc520cdp.o
 obj-$(CONFIG_MTD_NETSC520)	+= netsc520.o
 obj-$(CONFIG_MTD_SUN_UFLASH)	+= sun_uflash.o
+obj-$(CONFIG_MTD_SUN_JSFLASH)	+= sun_jsflash.o
 obj-$(CONFIG_MTD_VMAX)		+= vmax301.o
 obj-$(CONFIG_MTD_SCx200_DOCFLASH)+= scx200_docflash.o
 obj-$(CONFIG_MTD_DBOX2)		+= dbox2-flash.o
diff -urP linux-2.6.6/drivers/mtd/maps/sun_jsflash.c linux-2.6.6-mw1/drivers/mtd/maps/sun_jsflash.c
--- linux-2.6.6/drivers/mtd/maps/sun_jsflash.c	Thu Jan  1 01:00:00 1970
+++ linux-2.6.6-mw1/drivers/mtd/maps/sun_jsflash.c	Fri Jun  4 23:47:41 2004
@@ -0,0 +1,198 @@
+/*
+ * sun_jsflash - Driver implementation for user-programmable flash
+ * module present on Sun Javastations.
+ *
+ * This driver does NOT provide access to the OBP-flash for
+ * safety reasons-- use <linux>/drivers/sbus/char/flash.c instead.
+ *
+ * Copyright (C) 1999-2000 Pete Zaitcev (Old jsflash.c)
+ * Copyright (C) 2003 Jarno Manninen 
+ * Copyright (C) 2004 Jasper van der Neut - Stulen <jasper@dnd.utwente.nl>
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/fs.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <asm/oplib.h>
+#include <asm/uaccess.h>
+#include <asm/io.h>
+
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+
+#define MSG_PREFIX	"sun_jsflash:"
+
+static u32 jsflash_read32(struct map_info *map, unsigned long ofs)
+{
+	unsigned long retval, addr;
+
+	/* Non 4-byte aligned accesses kill the system,
+	   but MTD takes care of this after probing. */
+	if (ofs & 0x3) {
+		printk("%s: unaligned access", __FUNCTION__);
+		return 0;
+	}
+
+	addr = map->virt + ofs;
+
+	__asm__ __volatile__("lda [%1] %2, %0\n\t" :
+				"=r"(retval) :
+				"r"(addr), "i"(ASI_M_BYPASS));
+
+	return retval;
+}
+
+static void jsflash_copy_from(struct map_info *map, void *to,
+			      unsigned long from, ssize_t len)
+{
+	union byte4 {
+		char s[4];
+		unsigned int n;
+	} b;
+
+	ssize_t size = 4;
+
+	while (len > 0) {
+		b.n = jsflash_read32(map, from);
+		if (len < 4) {
+			size = len;
+		}
+		memcpy(to, b.s, size);
+		len -= size;
+		from += size;
+		to += size;
+	}
+
+	if (len > 0) {
+		printk("%s: length not zero, unaligned?", __FUNCTION__);
+	}
+}
+
+static void jsflash_write32(struct map_info *map, u32 data,
+			    unsigned long ofs)
+{
+
+	unsigned long addr;
+
+	if (ofs & 0x3) {
+		printk("%s: unaligned write at %lx (%lx)\n", __FUNCTION__,
+		       ofs, (unsigned long) data);
+		return;
+	}
+
+	addr = map->virt + ofs;
+
+	__asm__ __volatile__("sta %0, [%1] %2\n\t" :
+				/* no output */ :
+				"r"(data), "r"(addr), "i"(ASI_M_BYPASS):"memory");
+}
+
+static struct mtd_info *jsflash_mtd;
+
+static struct map_info jsflash_map = {
+
+	.name = "OS-flash",
+	.virt = 0x20400000,	/* We know this */
+	.size = 0x01000000,	/* 16 MiB window */
+	.buswidth = 4,		/* 32 bit native */
+	.read32 = jsflash_read32,
+	.copy_from = jsflash_copy_from,
+	.write32 = jsflash_write32,
+};
+
+static struct mtd_partition *mtd_parts = NULL;
+static int mtd_parts_nb = 0;
+
+const char *part_probes[] = { "cmdlinepart", NULL };
+
+static struct mtd_partition jsflash_partitions[] = {
+	{
+		.name = "Bootstrap",	/* SILO, proll, kernel */
+		.size = 0x100000,	/* 1MiB */
+		.offset = 0,
+	}, {
+		.name = "Filesystem",	/* rootfs */
+		.size = MTDPART_SIZ_FULL,
+		.offset = MTDPART_OFS_APPEND,
+	}
+};
+
+#define NUM_PARTITIONS	(sizeof(jsflash_partitions)/ \
+				sizeof(struct mtd_partition))
+
+static int __init jsflash_init(void)
+{
+	int node;
+
+	node = prom_getchild(prom_root_node);
+	node = prom_searchsiblings(node, "flash-memory");
+
+	if (node == 0 || node == -1 || sparc_cpu_model != sun4m) {
+		printk(KERN_INFO
+		       "sun_jsflash: unable to locate prom node\n");
+		return -ENODEV;
+	}
+	/* Now we must be on sun4m. And supposedly on Javastation */
+
+	/* Try to probe around in the flash window */
+	jsflash_mtd = do_map_probe("jedec_probe", &jsflash_map);
+
+	if (!jsflash_mtd) {
+		printk(KERN_NOTICE MSG_PREFIX "probe unsuccesful\n");
+		return (-ENODEV);
+	}
+
+	jsflash_mtd->owner = THIS_MODULE;
+
+	add_mtd_device(jsflash_mtd);
+	
+	mtd_parts_nb = parse_mtd_partitions(jsflash_mtd, part_probes,
+					    &mtd_parts, 0);
+
+	if (mtd_parts_nb > 0) {
+		
+		printk(KERN_NOTICE MSG_PREFIX "adding %d partitions\n",
+				mtd_parts_nb);
+		
+		add_mtd_partitions(jsflash_mtd, mtd_parts, mtd_parts_nb);
+		
+	}  else if (NUM_PARTITIONS > 0) {
+
+		printk(KERN_NOTICE MSG_PREFIX
+		       "using builtin partition definitions\n");
+
+		add_mtd_partitions(jsflash_mtd, jsflash_partitions,
+				   NUM_PARTITIONS);
+	}
+
+	return (0);
+}
+
+static void __exit jsflash_cleanup(void)
+{
+	if (jsflash_mtd) {
+
+		if (mtd_parts_nb) {
+			printk("deleting detected partitions\n");
+			del_mtd_partitions(jsflash_mtd);
+			kfree(mtd_parts);
+		} else if (NUM_PARTITIONS > 0) {
+			printk("deleting builtin partitions\n");
+			del_mtd_partitions(jsflash_mtd);
+		} 
+		del_mtd_device(jsflash_mtd);
+		map_destroy(jsflash_mtd);
+	}
+}
+
+module_init(jsflash_init);
+module_exit(jsflash_cleanup);
+
+MODULE_AUTHOR("Jasper van der Neut - Stulen <jasper@dnd.utwente.nl>");
+MODULE_DESCRIPTION("User-programmable flash device on Sun Javastations");
+MODULE_LICENSE("GPL");
