diff options
Diffstat (limited to 'include/linux/mtd/onenand.h')
-rw-r--r-- | include/linux/mtd/onenand.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mtd/onenand.h b/include/linux/mtd/onenand.h index 6f045b586e76..f775a7af3890 100644 --- a/include/linux/mtd/onenand.h +++ b/include/linux/mtd/onenand.h | |||
@@ -13,6 +13,7 @@ | |||
13 | #define __LINUX_MTD_ONENAND_H | 13 | #define __LINUX_MTD_ONENAND_H |
14 | 14 | ||
15 | #include <linux/spinlock.h> | 15 | #include <linux/spinlock.h> |
16 | #include <linux/completion.h> | ||
16 | #include <linux/mtd/onenand_regs.h> | 17 | #include <linux/mtd/onenand_regs.h> |
17 | #include <linux/mtd/bbm.h> | 18 | #include <linux/mtd/bbm.h> |
18 | 19 | ||
@@ -33,7 +34,6 @@ typedef enum { | |||
33 | FL_WRITING, | 34 | FL_WRITING, |
34 | FL_ERASING, | 35 | FL_ERASING, |
35 | FL_SYNCING, | 36 | FL_SYNCING, |
36 | FL_UNLOCKING, | ||
37 | FL_LOCKING, | 37 | FL_LOCKING, |
38 | FL_RESETING, | 38 | FL_RESETING, |
39 | FL_OTPING, | 39 | FL_OTPING, |
@@ -88,6 +88,7 @@ struct onenand_bufferram { | |||
88 | * operation is in progress | 88 | * operation is in progress |
89 | * @state: [INTERN] the current state of the OneNAND device | 89 | * @state: [INTERN] the current state of the OneNAND device |
90 | * @page_buf: data buffer | 90 | * @page_buf: data buffer |
91 | * @subpagesize: [INTERN] holds the subpagesize | ||
91 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme | 92 | * @ecclayout: [REPLACEABLE] the default ecc placement scheme |
92 | * @bbm: [REPLACEABLE] pointer to Bad Block Management | 93 | * @bbm: [REPLACEABLE] pointer to Bad Block Management |
93 | * @priv: [OPTIONAL] pointer to private chip date | 94 | * @priv: [OPTIONAL] pointer to private chip date |
@@ -120,11 +121,15 @@ struct onenand_chip { | |||
120 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); | 121 | int (*block_markbad)(struct mtd_info *mtd, loff_t ofs); |
121 | int (*scan_bbt)(struct mtd_info *mtd); | 122 | int (*scan_bbt)(struct mtd_info *mtd); |
122 | 123 | ||
124 | struct completion complete; | ||
125 | int irq; | ||
126 | |||
123 | spinlock_t chip_lock; | 127 | spinlock_t chip_lock; |
124 | wait_queue_head_t wq; | 128 | wait_queue_head_t wq; |
125 | onenand_state_t state; | 129 | onenand_state_t state; |
126 | unsigned char *page_buf; | 130 | unsigned char *page_buf; |
127 | 131 | ||
132 | int subpagesize; | ||
128 | struct nand_ecclayout *ecclayout; | 133 | struct nand_ecclayout *ecclayout; |
129 | 134 | ||
130 | void *bbm; | 135 | void *bbm; |
@@ -138,6 +143,7 @@ struct onenand_chip { | |||
138 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) | 143 | #define ONENAND_CURRENT_BUFFERRAM(this) (this->bufferram_index) |
139 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) | 144 | #define ONENAND_NEXT_BUFFERRAM(this) (this->bufferram_index ^ 1) |
140 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) | 145 | #define ONENAND_SET_NEXT_BUFFERRAM(this) (this->bufferram_index ^= 1) |
146 | #define ONENAND_SET_PREV_BUFFERRAM(this) (this->bufferram_index ^= 1) | ||
141 | 147 | ||
142 | #define ONENAND_GET_SYS_CFG1(this) \ | 148 | #define ONENAND_GET_SYS_CFG1(this) \ |
143 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) | 149 | (this->read_word(this->base + ONENAND_REG_SYS_CFG1)) |