aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/os-linux.h
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:12 -0400
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-22 17:18:12 -0400
commitc8b229de2b05c2b3e8d282ce260935a88ac030ca (patch)
tree09391866a6a9740df2a178c7894557025c9dc2c8 /fs/jffs2/os-linux.h
parent28318776a80bc3261f9af91ef79e6e38bb9f5bec (diff)
[MTD] Merge STMicro NOR_ECC code with Intel Sibley code
In 2002, STMicro started producing NOR flashes with internal ECC protection for small blocks (8 or 16 bytes). Support for those flashes was added by me. In 2005, Intel Sibley flashes copied this strategy and Nico added support for those. Merge the code for both. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'fs/jffs2/os-linux.h')
-rw-r--r--fs/jffs2/os-linux.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
index d2ad2a2081d8..1a6eb955e0be 100644
--- a/fs/jffs2/os-linux.h
+++ b/fs/jffs2/os-linux.h
@@ -92,11 +92,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
92#define jffs2_flash_writev(a,b,c,d,e,f) jffs2_flash_direct_writev(a,b,c,d,e) 92#define jffs2_flash_writev(a,b,c,d,e,f) jffs2_flash_direct_writev(a,b,c,d,e)
93#define jffs2_wbuf_timeout NULL 93#define jffs2_wbuf_timeout NULL
94#define jffs2_wbuf_process NULL 94#define jffs2_wbuf_process NULL
95#define jffs2_nor_ecc(c) (0)
96#define jffs2_dataflash(c) (0) 95#define jffs2_dataflash(c) (0)
97#define jffs2_nor_wbuf_flash(c) (0)
98#define jffs2_nor_ecc_flash_setup(c) (0)
99#define jffs2_nor_ecc_flash_cleanup(c) do {} while (0)
100#define jffs2_dataflash_setup(c) (0) 96#define jffs2_dataflash_setup(c) (0)
101#define jffs2_dataflash_cleanup(c) do {} while (0) 97#define jffs2_dataflash_cleanup(c) do {} while (0)
102#define jffs2_nor_wbuf_flash_setup(c) (0) 98#define jffs2_nor_wbuf_flash_setup(c) (0)
@@ -110,7 +106,7 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f)
110#define jffs2_can_mark_obsolete(c) (0) 106#define jffs2_can_mark_obsolete(c) (0)
111#else 107#else
112#define jffs2_can_mark_obsolete(c) \ 108#define jffs2_can_mark_obsolete(c) \
113 ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_ECC|MTD_PROGRAM_REGIONS))) || \ 109 ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_PROGRAM_REGIONS))) || \
114 c->mtd->type == MTD_RAM) 110 c->mtd->type == MTD_RAM)
115#endif 111#endif
116 112
@@ -135,10 +131,6 @@ int jffs2_flush_wbuf_pad(struct jffs2_sb_info *c);
135int jffs2_nand_flash_setup(struct jffs2_sb_info *c); 131int jffs2_nand_flash_setup(struct jffs2_sb_info *c);
136void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c); 132void jffs2_nand_flash_cleanup(struct jffs2_sb_info *c);
137 133
138#define jffs2_nor_ecc(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_ECC))
139int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c);
140void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c);
141
142#define jffs2_dataflash(c) (c->mtd->type == MTD_DATAFLASH) 134#define jffs2_dataflash(c) (c->mtd->type == MTD_DATAFLASH)
143int jffs2_dataflash_setup(struct jffs2_sb_info *c); 135int jffs2_dataflash_setup(struct jffs2_sb_info *c);
144void jffs2_dataflash_cleanup(struct jffs2_sb_info *c); 136void jffs2_dataflash_cleanup(struct jffs2_sb_info *c);