[MTD] Introduce writesize
[firefly-linux-kernel-4.4.55.git] / include / linux / mtd / mtd.h
index e95d0463a3e5a5237007455c02f8bba71367eee4..d48c7492392b97547e79a080c64312318acc3e3d 100644 (file)
@@ -14,7 +14,6 @@
 #endif
 
 #include <linux/config.h>
-#include <linux/version.h>
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/uio.h>
@@ -62,13 +61,17 @@ struct mtd_info {
        u_int32_t flags;
        u_int32_t size;  // Total size of the MTD
 
-       /* "Major" erase size for the device. Naïve users may take this
+       /* "Major" erase size for the device. Naïve users may take this
         * to be the only erase size available, or may use the more detailed
         * information below if they desire
         */
        u_int32_t erasesize;
+       /* Smallest availlable size for writing to the device.  For NAND,
+        * this is the page size, for some NOR chips, the size of ECC
+        * covered blocks.
+        */
+       u_int32_t writesize;
 
-       u_int32_t oobblock;  // Size of OOB blocks (e.g. 512)
        u_int32_t oobsize;   // Amount of OOB data per block (e.g. 16)
        u_int32_t ecctype;
        u_int32_t eccsize;
@@ -80,7 +83,6 @@ struct mtd_info {
         * 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