aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:29 -0400
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:29 -0400
commit5fa433942ba4e399f7e28764c9db4ade89e91d40 (patch)
tree29a2691729645bf27fd2d7d8d61a5c720c6569c1 /fs
parentc8b229de2b05c2b3e8d282ce260935a88ac030ca (diff)
[MTD] Introduce MTD_BIT_WRITEABLE
o Add a flag MTD_BIT_WRITEABLE for devices that allow single bits to be cleared. o Replace MTD_PROGRAM_REGIONS with a cleared MTD_BIT_WRITEABLE flag for STMicro and Intel Sibley flashes with internal ECC. Those flashes disallow clearing of single bits, unlike regular NOR flashes, so the new flag models their behaviour better. o Remove MTD_ECC. After the STMicro/Sibley merge, this flag is only set and never checked. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'fs')
-rw-r--r--fs/jffs2/os-linux.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index 1a6eb955e0be..743c9e52152d 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -105,9 +105,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
105#ifdef CONFIG_JFFS2_SUMMARY 105#ifdef CONFIG_JFFS2_SUMMARY
106#define jffs2_can_mark_obsolete(c) (0) 106#define jffs2_can_mark_obsolete(c) (0)
107#else 107#else
108#define jffs2_can_mark_obsolete(c) \ 108#define jffs2_can_mark_obsolete(c) (c->mtd->flags & (MTD_BIT_WRITEABLE))
109 ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_PROGRAM_REGIONS))) || \
110 c->mtd->type == MTD_RAM)
111#endif 109#endif
112 110
113#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) 111#define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH)
@@ -135,7 +133,7 @@ void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c);
135int jffs2_dataflash_setup(struct jffs2_sb_info *c); 133int jffs2_dataflash_setup(struct jffs2_sb_info *c);
136void jffs2_dataflash_cleanup(struct jffs2_sb_info *c); 134void jffs2_dataflash_cleanup(struct jffs2_sb_info *c);
137 135
138#define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_PROGRAM_REGIONS)) 136#define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && ! (c->mtd->flags & MTD_BIT_WRITEABLE))
139int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c); 137int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c);
140void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c); 138void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c);
141 139