diff options
author | Nicolas Pitre <nico@cam.org> | 2005-08-06 00:51:33 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 14:13:52 -0500 |
commit | 59da721a2288b8aec751a2716f7ab60f2ea0c925 (patch) | |
tree | 902a0a61cd3ed7e2dab27f20b4fd541566f598a1 /fs/jffs2/os-linux.h | |
parent | e102d54abf6806b95c89142cd0b7e94d709ebcd7 (diff) |
[JFFS2] Teach JFFS2 about Sibley flash
Intels Sibley flash needs JFFS2 write buffer functionality
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/os-linux.h')
-rw-r--r-- | fs/jffs2/os-linux.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index 0fc952eaf8c8..c3c1619fb137 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: os-linux.h,v 1.59 2005/07/17 11:13:46 dedekind Exp $ | 10 | * $Id: os-linux.h,v 1.60 2005/08/06 04:51:30 nico Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -85,16 +85,21 @@ static inline void jffs2_init_inode_info(struct jffs2_inode_info *f) | |||
85 | #define jffs2_wbuf_process NULL | 85 | #define jffs2_wbuf_process NULL |
86 | #define jffs2_nor_ecc(c) (0) | 86 | #define jffs2_nor_ecc(c) (0) |
87 | #define jffs2_dataflash(c) (0) | 87 | #define jffs2_dataflash(c) (0) |
88 | #define jffs2_nor_wbuf_flash(c) (0) | ||
88 | #define jffs2_nor_ecc_flash_setup(c) (0) | 89 | #define jffs2_nor_ecc_flash_setup(c) (0) |
89 | #define jffs2_nor_ecc_flash_cleanup(c) do {} while (0) | 90 | #define jffs2_nor_ecc_flash_cleanup(c) do {} while (0) |
90 | #define jffs2_dataflash_setup(c) (0) | 91 | #define jffs2_dataflash_setup(c) (0) |
91 | #define jffs2_dataflash_cleanup(c) do {} while (0) | 92 | #define jffs2_dataflash_cleanup(c) do {} while (0) |
93 | #define jffs2_nor_wbuf_flash_setup(c) (0) | ||
94 | #define jffs2_nor_wbuf_flash_cleanup(c) do {} while (0) | ||
92 | 95 | ||
93 | #else /* NAND and/or ECC'd NOR support present */ | 96 | #else /* NAND and/or ECC'd NOR support present */ |
94 | 97 | ||
95 | #define jffs2_is_writebuffered(c) (c->wbuf != NULL) | 98 | #define jffs2_is_writebuffered(c) (c->wbuf != NULL) |
96 | #define SECTOR_ADDR(x) ( ((unsigned long)(x) / (unsigned long)(c->sector_size)) * c->sector_size ) | 99 | #define SECTOR_ADDR(x) ( ((unsigned long)(x) / (unsigned long)(c->sector_size)) * c->sector_size ) |
97 | #define jffs2_can_mark_obsolete(c) ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & MTD_ECC)) || c->mtd->type == MTD_RAM) | 100 | #define jffs2_can_mark_obsolete(c) \ |
101 | ((c->mtd->type == MTD_NORFLASH && !(c->mtd->flags & (MTD_ECC|MTD_PROGRAM_REGIONS))) || \ | ||
102 | c->mtd->type == MTD_RAM) | ||
98 | #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) | 103 | #define jffs2_cleanmarker_oob(c) (c->mtd->type == MTD_NANDFLASH) |
99 | 104 | ||
100 | #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf)) | 105 | #define jffs2_flash_write_oob(c, ofs, len, retlen, buf) ((c)->mtd->write_oob((c)->mtd, ofs, len, retlen, buf)) |
@@ -124,6 +129,10 @@ void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c); | |||
124 | int jffs2_dataflash_setup(struct jffs2_sb_info *c); | 129 | int jffs2_dataflash_setup(struct jffs2_sb_info *c); |
125 | void jffs2_dataflash_cleanup(struct jffs2_sb_info *c); | 130 | void jffs2_dataflash_cleanup(struct jffs2_sb_info *c); |
126 | 131 | ||
132 | #define jffs2_nor_wbuf_flash(c) (c->mtd->type == MTD_NORFLASH && (c->mtd->flags & MTD_PROGRAM_REGIONS)) | ||
133 | int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c); | ||
134 | void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c); | ||
135 | |||
127 | #endif /* WRITEBUFFER */ | 136 | #endif /* WRITEBUFFER */ |
128 | 137 | ||
129 | /* erase.c */ | 138 | /* erase.c */ |