aboutsummaryrefslogtreecommitdiff
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-20 12:39:18 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-20 12:39:18 +0200
commit170465ee7f5a9a2d0ac71285507e52642e040353 (patch)
treedbca81f04cde9e625170abbd6a72555cfbeb194e /include/linux/mtd
parent169ad16bb87c10a3f7c108bb7008ebc0270f617a (diff)
parent1fca25427482387689fa27594c992a961d98768f (diff)
Merge branch 'linus' into x86/xen
Diffstat (limited to 'include/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h6
-rw-r--r--include/linux/mtd/nand.h4
2 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 4ed40caff4e..92263654855 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -272,7 +272,11 @@ static inline void mtd_erase_callback(struct erase_info *instr)
printk(KERN_INFO args); \
} while(0)
#else /* CONFIG_MTD_DEBUG */
-#define DEBUG(n, args...) do { } while(0)
+#define DEBUG(n, args...) \
+ do { \
+ if (0) \
+ printk(KERN_INFO args); \
+ } while(0)
#endif /* CONFIG_MTD_DEBUG */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 83f678702df..81774e5facf 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -177,7 +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))
-#define NAND_SUBPAGE_READ(chip) ((chip->ecc.mode == NAND_ECC_SOFT))
+/* 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)