[RFC] mtd/nand: modify NAND_CHIPOPTIONS_MSK

Jan Weitzel j.weitzel at phytec.de
Mon Nov 28 09:20:40 EST 2011


Trying to set NAND_NO_SUBPAGE_WRITE from platform fail, because
nand_flash_detect_onfi options from struct nand_flash_dev overwrite the flag.

Removing NAND_NO_SUBPAGE_WRITE from NAND_CHIPOPTIONS_MSK fix this,
but setting it via struct nand_flash_dev table is not longer supported.

Signed-off-by: Jan Weitzel <j.weitzel at phytec.de>
---
 include/linux/mtd/nand.h |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 904131b..babef5b 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -216,7 +216,8 @@ typedef enum {
 					&& (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)
+#define NAND_CHIPOPTIONS_MSK \
+	(0x0000ffff & ~NAND_NO_AUTOINCR & ~NAND_NO_SUBPAGE_WRITE)
 
 /* Non chip related options */
 /* This option skips the bbt scan during initialization. */
-- 
1.7.0.4




More information about the linux-mtd mailing list