diff -Nur linux-2.5.69-uc0/drivers/mtd/maps/Kconfig linux-2.5.x-develer/drivers/mtd/maps/Kconfig
--- linux-2.5.69-uc0/drivers/mtd/maps/Kconfig	2003-05-05 01:53:55.000000000 +0200
+++ linux-2.5.x-develer/drivers/mtd/maps/Kconfig	2003-05-18 07:29:10.000000000 +0200
@@ -305,6 +305,23 @@
 	help
 	  This enables access to the Flash on the FortuNet board.  If you
 	  have such a board, say 'Y'.
+config MTD_M5272C3
+	tristate "CFI Flash device mapped on Motorola M5272C3"
+	depends on M5272 && MTD_CFI
+	help
+	  This enables MTD access to CFI-compatible flash devices on the Motorola M5272C3 board.
+
+config MTD_DEVELER_CFI
+	tristate "CFI Flash device mapped on Develer M5272 boards"
+	depends on M5272 && MTD_CFI
+	help
+	  This enables MTD access to CFI-compatible flash devices on Develer M5272-based boards.
+
+config MTD_DEVELER_JEDEC
+	tristate "JEDEC Flash device mapped on Develer M5272 boards"
+	depends on M5272 && MTD_CFI
+	help
+	  This enables MTD access to JEDEC-compatible flash devices on Develer M5272-based boards.
 
 config MTD_AUTCPU12
 	tristate "NV-RAM mapping AUTCPU12 board"
diff -Nur linux-2.5.69-uc0/drivers/mtd/maps/Makefile linux-2.5.x-develer/drivers/mtd/maps/Makefile
--- linux-2.5.69-uc0/drivers/mtd/maps/Makefile	2003-05-05 01:52:48.000000000 +0200
+++ linux-2.5.x-develer/drivers/mtd/maps/Makefile	2003-05-06 03:07:09.000000000 +0200
@@ -32,6 +32,8 @@
 obj-$(CONFIG_MTD_DBOX2)		+= dbox2-flash.o
 obj-$(CONFIG_MTD_OCELOT)	+= ocelot.o
 obj-$(CONFIG_MTD_UCLINUX)	+= uclinux.o
+obj-$(CONFIG_MTD_DEVELER_CFI)	+= develer_cfi.o
+obj-$(CONFIG_MTD_DEVELER_JEDEC)	+= develer_jedec.o
 obj-$(CONFIG_MTD_SOLUTIONENGINE)+= solutionengine.o
 obj-$(CONFIG_MTD_PCI)		+= pci.o
 obj-$(CONFIG_MTD_AUTCPU12)	+= autcpu12-nvram.o
diff -Nur linux-2.5.69-uc0/drivers/mtd/maps/develer_cfi.c linux-2.5.x-develer/drivers/mtd/maps/develer_cfi.c
--- linux-2.5.69-uc0/drivers/mtd/maps/develer_cfi.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.5.x-develer/drivers/mtd/maps/develer_cfi.c	2003-05-06 03:32:41.000000000 +0200
@@ -0,0 +1,215 @@
+/*
+ *
+ * Normal mappings of chips in physical memory
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/config.h>
+
+
+#define WINDOW_ADDR 0xffe00000
+#define WINDOW_SIZE 0x200000
+#define BUSWIDTH 2
+
+extern char* ppcboot_getenv(char* v);
+
+static struct mtd_info *mymtd;
+
+static __u8 develer_cfi_read8(struct map_info *map, unsigned long ofs)
+{
+	return readb(map->map_priv_1 + ofs);
+}
+
+static __u16 develer_cfi_read16(struct map_info *map, unsigned long ofs)
+{
+	return readw(map->map_priv_1 + ofs);
+}
+
+static __u32 develer_cfi_read32(struct map_info *map, unsigned long ofs)
+{
+	return readl(map->map_priv_1 + ofs);
+}
+
+static void develer_cfi_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
+{
+	memcpy_fromio(to, map->map_priv_1 + from, len);
+}
+
+static void develer_cfi_write8(struct map_info *map, __u8 d, unsigned long adr)
+{
+	writeb(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_cfi_write16(struct map_info *map, __u16 d, unsigned long adr)
+{
+	writew(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_cfi_write32(struct map_info *map, __u32 d, unsigned long adr)
+{
+	writel(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_cfi_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
+{
+	memcpy_toio(map->map_priv_1 + to, from, len);
+}
+
+static struct map_info develer_cfi_map = {
+	.name = "Develer flash device",
+	.size = WINDOW_SIZE,
+	.buswidth = BUSWIDTH,
+	.read8 = develer_cfi_read8,
+	.read16 = develer_cfi_read16,
+	.read32 = develer_cfi_read32,
+	.copy_from = develer_cfi_copy_from,
+	.write8 = develer_cfi_write8,
+	.write16 = develer_cfi_write16,
+	.write32 = develer_cfi_write32,
+	.copy_to = develer_cfi_copy_to
+};
+
+/*
+ * MTD 'PARTITIONING' STUFF 
+ */
+
+#ifndef CONFIG_PPCBOOT
+
+static struct mtd_partition develer_cfi_partitions[] = {
+	{
+		.name = "boot (32K)",
+		.size = 0x8000,
+		.offset = 0
+	},
+	{
+		.name = "kernel (480K)",
+		.size = 0x78000,
+		.offset = 0x8000
+	},
+	{
+		.name = "rootfs (1536K)",
+		.size = 0x180000,
+		.offset = 0x80000
+	}
+};
+
+#else
+
+#define DEVELER_CFI_MAX_PARTITIONS 8
+#define DEVELER_CFI_MAX_PARTARGENTRIES 3
+#define DEVELER_CFI_PTABLE_BUFSIZE 256
+static struct mtd_partition develer_cfi_partitions[DEVELER_CFI_MAX_PARTITIONS];
+static int develer_cfi_partitions_cnt=0;
+static char* develer_cfi_emptyentry = "";
+
+static void read_develer_cfi_partitiontable(void) {
+	char* envptable=ppcboot_getenv("ptable");
+	if(envptable) {
+		char ptable[DEVELER_CFI_PTABLE_BUFSIZE],*p,*pt;
+		int pcnt,acnt,i;
+		char *ptableargentry[DEVELER_CFI_MAX_PARTITIONS][DEVELER_CFI_MAX_PARTARGENTRIES];
+
+		strncpy(ptable,envptable,DEVELER_CFI_PTABLE_BUFSIZE-1);
+		ptable[DEVELER_CFI_PTABLE_BUFSIZE-1]=0;
+
+		for(pcnt=0;pcnt<DEVELER_CFI_MAX_PARTITIONS;pcnt++) {
+			for(acnt=0;acnt<DEVELER_CFI_MAX_PARTARGENTRIES;acnt++) {
+				ptableargentry[pcnt][acnt]=develer_cfi_emptyentry;
+			};
+		};
+
+		pcnt=acnt=0;
+		p=pt=ptable;
+		while(1) {
+			if((*p == ',') || (*p == ':') || (*p == 0)) {
+				if(pcnt<DEVELER_CFI_MAX_PARTITIONS) {      
+					if(acnt<DEVELER_CFI_MAX_PARTARGENTRIES)
+						ptableargentry[pcnt][acnt++]=pt;
+					if((*p == ':') || ( *p == 0 ))
+					{ acnt=0; pcnt++; };
+					if( *p == 0 )
+						break;
+					pt=p+1;
+				};
+				*p=0;
+			};
+			p++;
+		};
+
+		for(i=0;i<pcnt;i++) {
+			develer_cfi_partitions[i].name=
+				(char*)kmalloc(strlen(ptableargentry[i][0])+1,GFP_KERNEL);
+			strcpy(develer_cfi_partitions[i].name,ptableargentry[i][0]);
+			develer_cfi_partitions[i].size=
+				simple_strtoul(ptableargentry[i][1],0,16)*0x1000;
+			develer_cfi_partitions[i].offset=
+				simple_strtoul(ptableargentry[i][2],0,16)*0x1000;
+		};
+
+		develer_cfi_partitions_cnt=pcnt;
+	};
+};
+
+#endif
+
+#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
+#define init_develer_cfi init_module
+#define cleanup_develer_cfi cleanup_module
+#endif
+
+int __init init_develer_cfi(void)
+{
+       	printk(KERN_NOTICE "Develer cfi flash device: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR);
+	develer_cfi_map.map_priv_1 = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
+
+	if (!develer_cfi_map.map_priv_1) {
+		printk("Failed to ioremap\n");
+		return -EIO;
+	}
+	mymtd = do_map_probe("cfi_probe", &develer_cfi_map);
+	if (mymtd) {
+		mymtd->module = THIS_MODULE;
+
+#ifdef CONFIG_PPCBOOT
+                read_develer_cfi_partitiontable();
+		if(develer_cfi_partitions_cnt) {
+		  return add_mtd_partitions(mymtd, develer_cfi_partitions, develer_cfi_partitions_cnt);
+		}
+		else {
+		  return  -ENXIO;
+		};
+#else
+		return add_mtd_partitions(mymtd, develer_cfi_partitions,
+					  sizeof(develer_cfi_partitions) /
+					  sizeof(struct mtd_partition));
+#endif
+	}
+
+	iounmap((void *)develer_cfi_map.map_priv_1);
+	return -ENXIO;
+}
+
+static void __exit cleanup_develer_cfi(void)
+{
+	if (mymtd) {
+		del_mtd_partitions(mymtd);
+		map_destroy(mymtd);
+	}
+	if (develer_cfi_map.map_priv_1) {
+		iounmap((void *)develer_cfi_map.map_priv_1);
+		develer_cfi_map.map_priv_1 = 0;
+	}
+}
+
+module_init(init_develer_cfi);
+module_exit(cleanup_develer_cfi);
+
diff -Nur linux-2.5.69-uc0/drivers/mtd/maps/develer_jedec.c linux-2.5.x-develer/drivers/mtd/maps/develer_jedec.c
--- linux-2.5.69-uc0/drivers/mtd/maps/develer_jedec.c	1970-01-01 01:00:00.000000000 +0100
+++ linux-2.5.x-develer/drivers/mtd/maps/develer_jedec.c	2003-05-06 03:32:41.000000000 +0200
@@ -0,0 +1,215 @@
+/*
+ *
+ * Normal mappings of chips in physical memory
+ */
+
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/kernel.h>
+#include <asm/io.h>
+#include <linux/mtd/mtd.h>
+#include <linux/mtd/map.h>
+#include <linux/mtd/partitions.h>
+#include <linux/config.h>
+
+
+#define WINDOW_ADDR 0xffe00000
+#define WINDOW_SIZE 0x200000
+#define BUSWIDTH 2
+
+extern char* ppcboot_getenv(char* v);
+
+static struct mtd_info *mymtd;
+
+static __u8 develer_jedec_read8(struct map_info *map, unsigned long ofs)
+{
+	return readb(map->map_priv_1 + ofs);
+}
+
+static __u16 develer_jedec_read16(struct map_info *map, unsigned long ofs)
+{
+	return readw(map->map_priv_1 + ofs);
+}
+
+static __u32 develer_jedec_read32(struct map_info *map, unsigned long ofs)
+{
+	return readl(map->map_priv_1 + ofs);
+}
+
+static void develer_jedec_copy_from(struct map_info *map, void *to, unsigned long from, ssize_t len)
+{
+	memcpy_fromio(to, map->map_priv_1 + from, len);
+}
+
+static void develer_jedec_write8(struct map_info *map, __u8 d, unsigned long adr)
+{
+	writeb(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_jedec_write16(struct map_info *map, __u16 d, unsigned long adr)
+{
+	writew(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_jedec_write32(struct map_info *map, __u32 d, unsigned long adr)
+{
+	writel(d, map->map_priv_1 + adr);
+	mb();
+}
+
+static void develer_jedec_copy_to(struct map_info *map, unsigned long to, const void *from, ssize_t len)
+{
+	memcpy_toio(map->map_priv_1 + to, from, len);
+}
+
+static struct map_info develer_jedec_map = {
+	.name = "Develer flash device",
+	.size = WINDOW_SIZE,
+	.buswidth = BUSWIDTH,
+	.read8 = develer_jedec_read8,
+	.read16 = develer_jedec_read16,
+	.read32 = develer_jedec_read32,
+	.copy_from = develer_jedec_copy_from,
+	.write8 = develer_jedec_write8,
+	.write16 = develer_jedec_write16,
+	.write32 = develer_jedec_write32,
+	.copy_to = develer_jedec_copy_to
+};
+
+/*
+ * MTD 'PARTITIONING' STUFF 
+ */
+
+#ifndef CONFIG_PPCBOOT
+
+static struct mtd_partition develer_jedec_partitions[] = {
+	{
+		.name = "boot (32K)",
+		.size = 0x8000,
+		.offset = 0
+	},
+	{
+		.name = "kernel (480K)",
+		.size = 0x78000,
+		.offset = 0x8000
+	},
+	{
+		.name = "rootfs (1536K)",
+		.size = 0x180000,
+		.offset = 0x80000
+	}
+};
+
+#else
+
+#define DEVELER_JEDEC_MAX_PARTITIONS 8
+#define DEVELER_JEDEC_MAX_PARTARGENTRIES 3
+#define DEVELER_JEDEC_PTABLE_BUFSIZE 256
+static struct mtd_partition develer_jedec_partitions[DEVELER_JEDEC_MAX_PARTITIONS];
+static int develer_jedec_partitions_cnt=0;
+static char* develer_jedec_emptyentry = "";
+
+static void read_develer_jedec_partitiontable(void) {
+	char* envptable=ppcboot_getenv("ptable");
+	if(envptable) {
+		char ptable[DEVELER_JEDEC_PTABLE_BUFSIZE],*p,*pt;
+		int pcnt,acnt,i;
+		char *ptableargentry[DEVELER_JEDEC_MAX_PARTITIONS][DEVELER_JEDEC_MAX_PARTARGENTRIES];
+
+		strncpy(ptable,envptable,DEVELER_JEDEC_PTABLE_BUFSIZE-1);
+		ptable[DEVELER_JEDEC_PTABLE_BUFSIZE-1]=0;
+
+		for(pcnt=0;pcnt<DEVELER_JEDEC_MAX_PARTITIONS;pcnt++) {
+			for(acnt=0;acnt<DEVELER_JEDEC_MAX_PARTARGENTRIES;acnt++) {
+				ptableargentry[pcnt][acnt]=develer_jedec_emptyentry;
+			};
+		};
+
+		pcnt=acnt=0;
+		p=pt=ptable;
+		while(1) {
+			if((*p == ',') || (*p == ':') || (*p == 0)) {
+				if(pcnt<DEVELER_JEDEC_MAX_PARTITIONS) {      
+					if(acnt<DEVELER_JEDEC_MAX_PARTARGENTRIES)
+						ptableargentry[pcnt][acnt++]=pt;
+					if((*p == ':') || ( *p == 0 ))
+					{ acnt=0; pcnt++; };
+					if( *p == 0 )
+						break;
+					pt=p+1;
+				};
+				*p=0;
+			};
+			p++;
+		};
+
+		for(i=0;i<pcnt;i++) {
+			develer_jedec_partitions[i].name=
+				(char*)kmalloc(strlen(ptableargentry[i][0])+1,GFP_KERNEL);
+			strcpy(develer_jedec_partitions[i].name,ptableargentry[i][0]);
+			develer_jedec_partitions[i].size=
+				simple_strtoul(ptableargentry[i][1],0,16)*0x1000;
+			develer_jedec_partitions[i].offset=
+				simple_strtoul(ptableargentry[i][2],0,16)*0x1000;
+		};
+
+		develer_jedec_partitions_cnt=pcnt;
+	};
+};
+
+#endif
+
+#if LINUX_VERSION_CODE < 0x20212 && defined(MODULE)
+#define init_develer_jedec init_module
+#define cleanup_develer_jedec cleanup_module
+#endif
+
+int __init init_develer_jedec(void)
+{
+       	printk(KERN_NOTICE "Develer jedec flash device: %x at %x\n", WINDOW_SIZE, WINDOW_ADDR);
+	develer_jedec_map.map_priv_1 = (unsigned long)ioremap(WINDOW_ADDR, WINDOW_SIZE);
+
+	if (!develer_jedec_map.map_priv_1) {
+		printk("Failed to ioremap\n");
+		return -EIO;
+	}
+	mymtd = do_map_probe("jedec_probe", &develer_jedec_map);
+	if (mymtd) {
+		mymtd->module = THIS_MODULE;
+
+#ifdef CONFIG_PPCBOOT
+                read_develer_jedec_partitiontable();
+		if(develer_jedec_partitions_cnt) {
+		  return add_mtd_partitions(mymtd, develer_jedec_partitions, develer_jedec_partitions_cnt);
+		}
+		else {
+		  return  -ENXIO;
+		};
+#else
+		return add_mtd_partitions(mymtd, develer_jedec_partitions,
+					  sizeof(develer_jedec_partitions) /
+					  sizeof(struct mtd_partition));
+#endif
+	}
+
+	iounmap((void *)develer_jedec_map.map_priv_1);
+	return -ENXIO;
+}
+
+static void __exit cleanup_develer_jedec(void)
+{
+	if (mymtd) {
+		del_mtd_partitions(mymtd);
+		map_destroy(mymtd);
+	}
+	if (develer_jedec_map.map_priv_1) {
+		iounmap((void *)develer_jedec_map.map_priv_1);
+		develer_jedec_map.map_priv_1 = 0;
+	}
+}
+
+module_init(init_develer_jedec);
+module_exit(cleanup_develer_jedec);
+
