]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/mtd/onenand.h
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / include / linux / mtd / onenand.h
index 0c8815bfae1c4583d3d34c24fcb58c3d4593b7db..ae418e41d8f52171c60b4352efbaa16c72da4cfc 100644 (file)
@@ -118,6 +118,8 @@ struct onenand_chip {
        int (*chip_probe)(struct mtd_info *mtd);
        int (*block_markbad)(struct mtd_info *mtd, loff_t ofs);
        int (*scan_bbt)(struct mtd_info *mtd);
+       int (*enable)(struct mtd_info *mtd);
+       int (*disable)(struct mtd_info *mtd);
 
        struct completion       complete;
        int                     irq;
@@ -137,6 +139,14 @@ struct onenand_chip {
        void                    *bbm;
 
        void                    *priv;
+
+       /*
+        * Shows that the current operation is composed
+        * of sequence of commands. For example, cache program.
+        * Such command status OnGo bit is checked at the end of
+        * sequence.
+        */
+       unsigned int            ongoing;
 };
 
 /*
@@ -171,6 +181,9 @@ struct onenand_chip {
 #define ONENAND_IS_2PLANE(this)                        (0)
 #endif
 
+#define ONENAND_IS_CACHE_PROGRAM(this)                                 \
+       (this->options & ONENAND_HAS_CACHE_PROGRAM)
+
 /* Check byte access in OneNAND */
 #define ONENAND_CHECK_BYTE_ACCESS(addr)                (addr & 0x1)
 
@@ -181,6 +194,7 @@ struct onenand_chip {
 #define ONENAND_HAS_UNLOCK_ALL         (0x0002)
 #define ONENAND_HAS_2PLANE             (0x0004)
 #define ONENAND_HAS_4KB_PAGE           (0x0008)
+#define ONENAND_HAS_CACHE_PROGRAM      (0x0010)
 #define ONENAND_SKIP_UNLOCK_CHECK      (0x0100)
 #define ONENAND_PAGEBUF_ALLOC          (0x1000)
 #define ONENAND_OOBBUF_ALLOC           (0x2000)