MTD patches

Ian Campbell icampbell at arcom.com
Tue Aug 17 04:32:33 EDT 2004


Hi David, 

I've had a couple of patches to MTD sitting in my 2.6 tree for a while
now and wonder if you would consider including them.

All of the patches are against 2.6.8.1, although they have been applying
unchanged for many versions now.

mtd-redboot-partition-fixes.patch

        This patch has two parts. 
        
        The first is to factor out the offset to look at for the RedBoot
        partition table into a variable. This has no impact on the code
        as is, but makes it easier and clearer for platforms that have
        the partition table at some other offset to wrap a #ifdef
        CONFIG_ARCH_ around the variable rather than introducing errors
        by cloning the whole master->read call.
        
        The second part looks for any partition name starting with
        "RedBoot" rather than looking for "RedBoot\0". On my platform
        RedBoot lives in a separate boot ROM, but the RedBoot config and
        partition table are in the main flash so we can find them.
        
mtd-add_full.patch
        
        This patch adds a new api call add_mtd_device_full() that allows
        a device to be added to a specific minor number (if it is
        available). I use this in my platform drivers to ensure that the
        SRAM device is always minor 14 and the BIOS device is always
        minor 15, even if the user changes the redboot partitioning
        scheme and changes the number of flash partitions.
        
        add_mtd_device now just calls _full with a minor of -1 to
        allocate any available device.
        
mtd-jedec-probe-parts
        
        This patch adds a few new part numbers to jedec_probe.c. They
        are AMD AM29F002T, Hyundai HY29F002T and Macronix MX29FOO2T.
        
Cheers,
Ian.

-- 
Ian Campbell, Senior Design Engineer
                                        Web: http://www.arcom.com
Arcom, Clifton Road, 			Direct: +44 (0)1223 403 465
Cambridge CB1 7EA, United Kingdom	Phone:  +44 (0)1223 411 200
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtd-redboot-partition-fixes.patch
Type: text/x-patch
Size: 994 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20040817/6c8c3deb/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mtd-add_full.patch
Type: text/x-patch
Size: 3442 bytes
Desc: not available
Url : http://lists.infradead.org/pipermail/linux-mtd/attachments/20040817/6c8c3deb/attachment-0001.bin 
-------------- next part --------------
%description
Add support for a couple of BIOS ROM devices.

%patch
Index: linux-2.6-bk/drivers/mtd/chips/jedec_probe.c
===================================================================
--- linux-2.6-bk.orig/drivers/mtd/chips/jedec_probe.c	2004-08-10 17:49:44.000000000 +0100
+++ linux-2.6-bk/drivers/mtd/chips/jedec_probe.c	2004-08-17 09:28:05.001562971 +0100
@@ -36,7 +36,8 @@
 #define MANUFACTURER_ST		0x0020
 #define MANUFACTURER_TOSHIBA	0x0098
 #define MANUFACTURER_WINBOND	0x00da
-
+#define MANUFACTURER_HYUNDAI	0x00AD
+#define MANUFACTURER_MACRONIX	0x00C2
 
 /* AMD */
 #define AM29DL800BB	0x22C8
@@ -56,6 +57,7 @@
 #define AM29F040	0x00A4
 #define AM29LV040B	0x004F
 #define AM29F032B	0x0041
+#define AM29F002T	0x00B0
 
 /* Atmel */
 #define AT49BV512	0x0003
@@ -154,6 +156,11 @@
 /* Winbond */
 #define W49V002A	0x00b0
 
+/* Hyundai */
+#define HY29F002T	0x00B0
+
+/* Macronix */
+#define MX29F002T	0x00B0
 
 /*
  * Unlock address sets for AMD command sets.
@@ -1570,7 +1577,40 @@
 			ERASEINFO(0x02000, 2),
 			ERASEINFO(0x04000, 1),
 		}
-	} 
+	}, {
+		mfr_id: MANUFACTURER_AMD,
+		dev_id: AM29F002T,
+		name: "AMD AM29F002T",
+		DevSize: SIZE_256KiB,
+		NumEraseRegions: 4,
+		regions: {ERASEINFO(0x10000,3),
+			  ERASEINFO(0x08000,1),
+			  ERASEINFO(0x02000,2),
+			  ERASEINFO(0x04000,1)
+		}
+	}, {
+		mfr_id: MANUFACTURER_HYUNDAI,
+		dev_id: HY29F002T,
+		name: "Hyundai HY29F002T",
+		DevSize: SIZE_256KiB,
+		NumEraseRegions: 4,
+		regions: {ERASEINFO(0x10000,3),
+			  ERASEINFO(0x08000,1),
+			  ERASEINFO(0x02000,2),
+			  ERASEINFO(0x04000,1)
+		}
+	}, {
+		mfr_id: MANUFACTURER_MACRONIX,
+		dev_id: MX29F002T,
+		name: "Macronix MX29F002T",
+		DevSize: SIZE_256KiB,
+		NumEraseRegions: 4,
+		regions: {ERASEINFO(0x10000,3),
+			  ERASEINFO(0x08000,1),
+			  ERASEINFO(0x02000,2),
+			  ERASEINFO(0x04000,1)
+		}
+	}
 };
 
 


More information about the linux-mtd mailing list