]> git.sur5r.net Git - u-boot/blobdiff - include/linux/mtd/nand.h
s5pc1xx: support onenand driver
[u-boot] / include / linux / mtd / nand.h
index 24ad2bdaa1883f46a815816f1686a3b4664ea61b..cb7c19a4392bdd49151aa09595520eba31b97e0d 100644 (file)
@@ -46,16 +46,11 @@ extern void nand_release (struct mtd_info *mtd);
 /* Internal helper for board drivers which need to override command function */
 extern void nand_wait_ready(struct mtd_info *mtd);
 
-/* The maximum number of NAND chips in an array */
-#ifndef NAND_MAX_CHIPS
-#define NAND_MAX_CHIPS         8
-#endif
-
 /* This constant declares the max. oobsize / page, which
  * is supported now. If you add a chip with bigger oobsize/page
  * adjust this accordingly.
  */
-#define NAND_MAX_OOBSIZE       128
+#define NAND_MAX_OOBSIZE       218
 #define NAND_MAX_PAGESIZE      4096
 
 /*
@@ -133,6 +128,7 @@ typedef enum {
        NAND_ECC_SOFT,
        NAND_ECC_HW,
        NAND_ECC_HW_SYNDROME,
+       NAND_ECC_HW_OOB_FIRST,
 } nand_ecc_modes_t;
 
 /*
@@ -273,13 +269,13 @@ struct nand_ecc_ctrl {
                                           uint8_t *calc_ecc);
        int                     (*read_page_raw)(struct mtd_info *mtd,
                                                 struct nand_chip *chip,
-                                                uint8_t *buf);
+                                                uint8_t *buf, int page);
        void                    (*write_page_raw)(struct mtd_info *mtd,
                                                  struct nand_chip *chip,
                                                  const uint8_t *buf);
        int                     (*read_page)(struct mtd_info *mtd,
                                             struct nand_chip *chip,
-                                            uint8_t *buf);
+                                            uint8_t *buf, int page);
        int                     (*read_subpage)(struct mtd_info *mtd,
                                             struct nand_chip *chip,
                                             uint32_t offs, uint32_t len,
@@ -477,10 +473,6 @@ struct nand_manufacturers {
 extern struct nand_flash_dev nand_flash_ids[];
 extern struct nand_manufacturers nand_manuf_ids[];
 
-#ifndef NAND_MAX_CHIPS
-#define NAND_MAX_CHIPS 8
-#endif
-
 extern int nand_scan_bbt(struct mtd_info *mtd, struct nand_bbt_descr *bd);
 extern int nand_update_bbt(struct mtd_info *mtd, loff_t offs);
 extern int nand_default_bbt(struct mtd_info *mtd);