aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mtd/mtd.h
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-08-06 05:40:46 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 20:12:17 +0100
commit638d983840bb64e02c29bdd6160bb9963f4090f7 (patch)
treef07e85847009236731f8cb2b9afcba35d40849b1 /include/linux/mtd/mtd.h
parent4843653cab0db036399f77d9355db31ce39cb8b9 (diff)
{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@cam.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/mtd/mtd.h')
-rw-r--r--include/linux/mtd/mtd.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index c50c3f3927d..ab580418391 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -1,5 +1,5 @@
/*
- * $Id: mtd.h,v 1.59 2005/04/11 10:19:02 gleixner Exp $
+ * $Id: mtd.h,v 1.60 2005/08/06 04:40:42 nico Exp $
*
* Copyright (C) 1999-2003 David Woodhouse <dwmw2@infradead.org> et al.
*
@@ -72,7 +72,17 @@ struct mtd_info {
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;