aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/wbuf.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2005-08-06 00:51:33 -0400
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 14:13:52 -0500
commit59da721a2288b8aec751a2716f7ab60f2ea0c925 (patch)
tree902a0a61cd3ed7e2dab27f20b4fd541566f598a1 /fs/jffs2/wbuf.c
parente102d54abf6806b95c89142cd0b7e94d709ebcd7 (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/wbuf.c')
-rw-r--r--fs/jffs2/wbuf.c22
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 @@
9 * 9 *
10 * For licensing information, see the file 'LICENCE' in this directory. 10 * For licensing information, see the file 'LICENCE' in this directory.
11 * 11 *
12 * $Id: wbuf.c,v 1.96 2005/07/22 10:32:08 dedekind Exp $ 12 * $Id: wbuf.c,v 1.97 2005/08/06 04:51:30 nico Exp $
13 * 13 *
14 */ 14 */
15 15
@@ -1235,3 +1235,23 @@ int jffs2_nor_ecc_flash_setup(struct jffs2_sb_info *c) {
1235void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) { 1235void jffs2_nor_ecc_flash_cleanup(struct jffs2_sb_info *c) {
1236 kfree(c->wbuf); 1236 kfree(c->wbuf);
1237} 1237}
1238
1239int jffs2_nor_wbuf_flash_setup(struct jffs2_sb_info *c) {
1240 /* Cleanmarker currently occupies a whole programming region */
1241 c->cleanmarker_size = MTD_PROGREGION_SIZE(c->mtd);
1242
1243 /* Initialize write buffer */
1244 init_rwsem(&c->wbuf_sem);
1245 c->wbuf_pagesize = MTD_PROGREGION_SIZE(c->mtd);
1246 c->wbuf_ofs = 0xFFFFFFFF;
1247
1248 c->wbuf = kmalloc(c->wbuf_pagesize, GFP_KERNEL);
1249 if (!c->wbuf)
1250 return -ENOMEM;
1251
1252 return 0;
1253}
1254
1255void jffs2_nor_wbuf_flash_cleanup(struct jffs2_sb_info *c) {
1256 kfree(c->wbuf);
1257}