diff options
author | Nicolas Pitre <nico@cam.org> | 2005-08-06 08:51:33 +0400 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-11-06 22:13:52 +0300 |
commit | 59da721a2288b8aec751a2716f7ab60f2ea0c925 (patch) | |
tree | 902a0a61cd3ed7e2dab27f20b4fd541566f598a1 /fs/jffs2/wbuf.c | |
parent | e102d54abf6806b95c89142cd0b7e94d709ebcd7 (diff) | |
download | linux-59da721a2288b8aec751a2716f7ab60f2ea0c925.tar.xz |
[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/wbuf.c')
-rw-r--r-- | fs/jffs2/wbuf.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c index 251ac3d86f99..8c06d3a2b17d 100644 --- a/fs/jffs2/wbuf.c +++ b/fs/jffs2/wbuf.c @@ -9,7 +9,7 @@ * * For licensing information, see the file 'LICENCE' in this directory. * - * $Id: wbuf.c,v 1.96 2005/07/22 10:32:08 dedekind Exp $ + * $Id: wbuf.c,v 1.97 2005/08/06 04:51:30 nico Exp $ * */ @@ -1235,3 +1235,23 @@ int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c) { void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) { kfree(c->wbuf); } + +int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) { + /* Cleanmarker currently occupies a whole programming region */ + c->cleanmarker_size = MTD_PROGREGION_SIZE(c->mtd); + + /* Initialize write buffer */ + init_rwsem(&c->wbuf_sem); + c->wbuf_pagesize = MTD_PROGREGION_SIZE(c->mtd); + c->wbuf_ofs = 0xFFFFFFFF; + + c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL); + if (!c->wbuf) + return -ENOMEM; + + return 0; +} + +void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c) { + kfree(c->wbuf); +} |