[MTD] Introduce writesize
[firefly-linux-kernel-4.4.55.git] / include / linux / mtd / mtd.h
index b6f2fdae65c6c284b9f511d35301af420a049303..d48c7492392b97547e79a080c64312318acc3e3d 100644 (file)
@@ -61,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;
@@ -79,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