Merge branch 'next'
[platform/kernel/u-boot.git] / include / linux / mtd / nand_legacy.h
index a8769e7..4334448 100644 (file)
 #ifndef __LINUX_MTD_NAND_LEGACY_H
 #define __LINUX_MTD_NAND_LEGACY_H
 
-#ifndef CFG_NAND_LEGACY
+#ifndef CONFIG_NAND_LEGACY
 #error This module is for the legacy NAND support
 #endif
 
+/* The maximum number of NAND chips in an array */
+#ifndef CONFIG_SYS_NAND_MAX_CHIPS
+#define CONFIG_SYS_NAND_MAX_CHIPS      1
+#endif
+
 /*
  * Standard NAND flash commands
  */
 #define NAND_CMD_RESET         0xff
 
 /*
- * Enumeration for NAND flash chip state
- */
-typedef enum {
-       FL_READY,
-       FL_READING,
-       FL_WRITING,
-       FL_ERASING,
-       FL_SYNCING
-} nand_state_t;
-
-
-/*
  * NAND Private Flash Chip Data
  *
  * Structure overview:
@@ -104,12 +97,12 @@ struct Nand {
 };
 
 struct nand_chip {
-       int             page_shift;
-       u_char          *data_buf;
-       u_char          *data_cache;
+       int             page_shift;
+       u_char          *data_buf;
+       u_char          *data_cache;
        int             cache_page;
-       u_char          ecc_code_buf[6];
-       u_char          reserved[2];
+       u_char          ecc_code_buf[6];
+       u_char          reserved[2];
        char ChipID; /* Type of DiskOnChip */
        struct Nand *chips;
        int chipshift;