summaryrefslogtreecommitdiff
path: root/include/linux/mtd/nand.h
diff options
context:
space:
mode:
authorAlessandro Rubini <rubini@unipv.it>2009-09-20 23:28:14 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2009-09-24 12:55:07 -0700
commit30631cb82d5c6c662d5ec682beaa834c1f9f0987 (patch)
tree9c329ebf759cdbc4be4cc488ae448bbb6ef73c11 /include/linux/mtd/nand.h
parentc62d81bcfe82526cc3da10cf4fc63faad368bc60 (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.h17
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 @@
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/mtd/mtd.h>
+#include <linux/mtd/flashchip.h>
#include <linux/mtd/bbm.h>
struct mtd_info;
@@ -203,20 +204,6 @@ typedef enum {
#define NAND_CI_CHIPNR_MSK 0x03
#define NAND_CI_CELLTYPE_MSK 0x0C
-/*
- * nand_state_t - chip states
- * Enumeration for NAND flash chip state
- */
-typedef enum {
- FL_READY,
- FL_READING,
- FL_WRITING,
- FL_ERASING,
- FL_SYNCING,
- FL_CACHEDPRG,
- FL_PM_SUSPENDED,
-} nand_state_t;
-
/* Keep gcc happy */
struct nand_chip;
@@ -403,7 +390,7 @@ struct nand_chip {
uint8_t cellinfo;
int badblockpos;
- nand_state_t state;
+ flstate_t state;
uint8_t *oob_poi;
struct nand_hw_control *controller;