mtd/include/linux/mtd cfi.h,1.54,1.55 mtd.h,1.59,1.60
Nicolas Pitre
nico at infradead.org
Sat Aug 6 00:40:45 EDT 2005
Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv14920/include/linux/mtd
Modified Files:
cfi.h mtd.h
Log Message:
{MTD] add support for Intel's "Sibley" flash
This updates the Primary Vendor-Specific Extended Query parsing to
version 1.4 in order to get the information about the Configurable
Programming Mode regions implemented in the Sibley flash, as well as
selecting the appropriate write command code.
This flash does not behave like traditional NOR flash when writing data.
While mtdblock should just work, further changes are needed for JFFS2 use.
Signed-off-by: Nicolas Pitre <nico at cam.org>
Index: cfi.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/cfi.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- cfi.h 6 Jun 2005 23:04:36 -0000 1.54
+++ cfi.h 6 Aug 2005 04:40:42 -0000 1.55
@@ -173,6 +173,15 @@
struct cfi_intelext_blockinfo BlockTypes[1];
} __attribute__((packed));
+struct cfi_intelext_programming_regioninfo {
+ uint8_t ProgRegShift;
+ uint8_t Reserved1;
+ uint8_t ControlValid;
+ uint8_t Reserved2;
+ uint8_t ControlInvalid;
+ uint8_t Reserved3;
+} __attribute__((packed));
+
/* Vendor-Specific PRI for AMD/Fujitsu Extended Command Set (0x0002) */
struct cfi_pri_amdstd {
@@ -316,7 +325,7 @@
#define CMD(x) cfi_build_cmd((x), map, cfi)
-static inline unsigned char cfi_merge_status(map_word val, struct map_info *map,
+static inline unsigned long cfi_merge_status(map_word val, struct map_info *map,
struct cfi_private *cfi)
{
int wordwidth, words_per_bus, chip_mode, chips_per_word;
Index: mtd.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/mtd.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- mtd.h 11 Apr 2005 10:19:02 -0000 1.59
+++ mtd.h 6 Aug 2005 04:40:42 -0000 1.60
@@ -72,7 +72,17 @@
u_int32_t oobsize; // Amount of OOB data per block (e.g. 16)
u_int32_t ecctype;
u_int32_t eccsize;
-
+
+ /*
+ * Reuse some of the above unused fields in the case of NOR flash
+ * with configurable programming regions to avoid modifying the
+ * user visible structure layout/size. Only valid when the
+ * MTD_PROGRAM_REGIONS flag is set.
+ * (Maybe we should have an union for those?)
+ */
+#define MTD_PROGREGION_SIZE(mtd) (mtd)->oobblock
+#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
+#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype
// Kernel-only stuff starts here.
char *name;
More information about the linux-mtd-cvs
mailing list