diff options
author | Alessandro Rubini <rubini@unipv.it> | 2009-09-20 17:28:14 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-09-24 15:55:07 -0400 |
commit | 30631cb82d5c6c662d5ec682beaa834c1f9f0987 (patch) | |
tree | 9c329ebf759cdbc4be4cc488ae448bbb6ef73c11 /include/linux/mtd/nand.h | |
parent | c62d81bcfe82526cc3da10cf4fc63faad368bc60 (diff) |
mtd: unify status enum from three headers
nand.h, onenand.h and flashchip.h defined enumeration types
for chip status using the same symbolic names. This prevented
a board file to include more than one of them. In particular,
no nand and onenand platform devices could live in the same file.
This patch augments flashchip.h with a few status values in order
to cover all cases, so nand.h and onenand.h can use flstate_t
without declaring their own status enum.
Signed-off-by: Alessandro Rubini <rubini@unipv.it>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'include/linux/mtd/nand.h')
-rw-r--r-- | include/linux/mtd/nand.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h index d87ada538d17..2476078a032f 100644 --- a/include/linux/mtd/nand.h +++ b/include/linux/mtd/nand.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/wait.h> | 21 | #include <linux/wait.h> |
22 | #include <linux/spinlock.h> | 22 | #include <linux/spinlock.h> |
23 | #include <linux/mtd/mtd.h> | 23 | #include <linux/mtd/mtd.h> |
24 | #include <linux/mtd/flashchip.h> | ||
24 | #include <linux/mtd/bbm.h> | 25 | #include <linux/mtd/bbm.h> |
25 | 26 | ||
26 | struct mtd_info; | 27 | struct mtd_info; |
@@ -203,20 +204,6 @@ typedef enum { | |||
203 | #define NAND_CI_CHIPNR_MSK 0x03 | 204 | #define NAND_CI_CHIPNR_MSK 0x03 |
204 | #define NAND_CI_CELLTYPE_MSK 0x0C | 205 | #define NAND_CI_CELLTYPE_MSK 0x0C |
205 | 206 | ||
206 | /* | ||
207 | * nand_state_t - chip states | ||
208 | * Enumeration for NAND flash chip state | ||
209 | */ | ||
210 | typedef enum { | ||
211 | FL_READY, | ||
212 | FL_READING, | ||
213 | FL_WRITING, | ||
214 | FL_ERASING, | ||
215 | FL_SYNCING, | ||
216 | FL_CACHEDPRG, | ||
217 | FL_PM_SUSPENDED, | ||
218 | } nand_state_t; | ||
219 | |||
220 | /* Keep gcc happy */ | 207 | /* Keep gcc happy */ |
221 | struct nand_chip; | 208 | struct nand_chip; |
222 | 209 | ||
@@ -403,7 +390,7 @@ struct nand_chip { | |||
403 | uint8_t cellinfo; | 390 | uint8_t cellinfo; |
404 | int badblockpos; | 391 | int badblockpos; |
405 | 392 | ||
406 | nand_state_t state; | 393 | flstate_t state; |
407 | 394 | ||
408 | uint8_t *oob_poi; | 395 | uint8_t *oob_poi; |
409 | struct nand_hw_control *controller; | 396 | struct nand_hw_control *controller; |