]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/mtd/nand.h
OMAP3 NAND: move NAND_BLOCK_SIZE macro to board-3430sdp-flash.c
[linux-2.6-omap-h63xx.git] / include / linux / mtd / nand.h
index 53ea3dc8b0e8ac98347d28170533de9a77dd55f7..81774e5facf4e74a2d5dd742bae6bb81a1922b17 100644 (file)
@@ -5,8 +5,6 @@
  *                     Steven J. Hill <sjhill@realitydiluted.com>
  *                    Thomas Gleixner <tglx@linutronix.de>
  *
- * $Id: nand.h,v 1.74 2005/09/15 13:58:50 vwool Exp $
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
@@ -179,6 +177,9 @@ typedef enum {
 #define NAND_MUST_PAD(chip) (!(chip->options & NAND_NO_PADDING))
 #define NAND_HAS_CACHEPROG(chip) ((chip->options & NAND_CACHEPRG))
 #define NAND_HAS_COPYBACK(chip) ((chip->options & NAND_COPYBACK))
+/* Large page NAND with SOFT_ECC should support subpage reads */
+#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT) \
+                                       && (chip->page_shift > 9))
 
 /* Mask to zero out the chip options, which come from the id table */
 #define NAND_CHIPOPTIONS_MSK   (0x0000ffff & ~NAND_NO_AUTOINCR)
@@ -276,6 +277,10 @@ struct nand_ecc_ctrl {
        int                     (*read_page)(struct mtd_info *mtd,
                                             struct nand_chip *chip,
                                             uint8_t *buf);
+       int                     (*read_subpage)(struct mtd_info *mtd,
+                                            struct nand_chip *chip,
+                                            uint32_t offs, uint32_t len,
+                                            uint8_t *buf);
        void                    (*write_page)(struct mtd_info *mtd,
                                              struct nand_chip *chip,
                                              const uint8_t *buf);