Merge branch 'hwmon-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
[powerpc.git] / include / mtd / mtd-abi.h
index c11a589..8e501a7 100644 (file)
@@ -7,11 +7,6 @@
 #ifndef __MTD_ABI_H__
 #define __MTD_ABI_H__
 
-#ifndef __KERNEL__ /* Urgh. The whole point of splitting this out into
-                   separate files was to avoid #ifdef __KERNEL__ */
-#define __user
-#endif
-
 struct erase_info_user {
        uint32_t start;
        uint32_t length;
@@ -32,19 +27,15 @@ struct mtd_oob_buf {
 
 #define MTD_WRITEABLE          0x400   /* Device is writeable */
 #define MTD_BIT_WRITEABLE      0x800   /* Single bits can be flipped */
+#define MTD_NO_ERASE           0x1000  /* No erase necessary */
+#define MTD_STUPID_LOCK                0x2000  /* Always locked after reset */
 
 // Some common devices / combinations of capabilities
 #define MTD_CAP_ROM            0
-#define MTD_CAP_RAM            (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
+#define MTD_CAP_RAM            (MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
 #define MTD_CAP_NORFLASH       (MTD_WRITEABLE | MTD_BIT_WRITEABLE)
 #define MTD_CAP_NANDFLASH      (MTD_WRITEABLE)
 
-
-// Types of automatic ECC/Checksum available
-#define MTD_ECC_NONE           0       // No automatic ECC available
-#define MTD_ECC_RS_DiskOnChip  1       // Automatic ECC on DiskOnChip
-#define MTD_ECC_SW             2       // SW ECC for Toshiba & Samsung devices
-
 /* ECC byte placement */
 #define MTD_NANDECC_OFF                0       // Switch off ECC (Not recommended)
 #define MTD_NANDECC_PLACE      1       // Use the given placement in the structure (YAFFS1 legacy mode)
@@ -64,6 +55,8 @@ struct mtd_info_user {
        uint32_t erasesize;
        uint32_t writesize;
        uint32_t oobsize;   // Amount of OOB data per block (e.g. 16)
+       /* The below two fields are obsolete and broken, do not use them
+        * (TODO: remove at some point) */
        uint32_t ecctype;
        uint32_t eccsize;
 };
@@ -131,7 +124,7 @@ struct nand_ecclayout {
 };
 
 /**
- * struct mtd_ecc_stats - error correction status
+ * struct mtd_ecc_stats - error correction stats
  *
  * @corrected: number of corrected bits
  * @failed:    number of uncorrectable errors