[MTD] Delete allegedly obsolete "bank_size" field of mtd_info.
[powerpc.git] / include / linux / mtd / mtd.h
index d644e57..fd64ccf 100644 (file)
@@ -9,10 +9,6 @@
 #ifndef __MTD_MTD_H__
 #define __MTD_MTD_H__
 
-#ifndef __KERNEL__
-#error This is a kernel header. Perhaps include mtd-user.h instead?
-#endif
-
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/uio.h>
@@ -53,6 +49,7 @@ struct mtd_erase_region_info {
        u_int32_t offset;                       /* At which this region starts, from the beginning of the MTD */
        u_int32_t erasesize;            /* For this region */
        u_int32_t numblocks;            /* Number of blocks of erasesize in this region */
+       unsigned long *lockmap;         /* If keeping bitmap of locks */
 };
 
 /*
@@ -85,6 +82,10 @@ typedef enum {
  *             mode = MTD_OOB_PLACE)
  * @datbuf:    data buffer - if NULL only oob data are read/written
  * @oobbuf:    oob data buffer
+ *
+ * Note, it is allowed to read more then one OOB area at one go, but not write.
+ * The interface assumes that the OOB write requests program only one page's
+ * OOB area.
  */
 struct mtd_oob_ops {
        mtd_oob_mode_t  mode;
@@ -117,18 +118,7 @@ struct mtd_info {
        u_int32_t writesize;
 
        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_CTRLMODE_VALID(mtd)  (mtd)->oobsize
-#define MTD_PROGREGION_CTRLMODE_INVALID(mtd)  (mtd)->ecctype
+       u_int32_t oobavail;  // Available OOB bytes per block
 
        // Kernel-only stuff starts here.
        char *name;
@@ -143,9 +133,6 @@ struct mtd_info {
        int numeraseregions;
        struct mtd_erase_region_info *eraseregions;
 
-       /* This really shouldn't be here. It can go away in 2.5 */
-       u_int32_t bank_size;
-
        int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
 
        /* This stuff for eXecute-In-Place */