[JFFS2] Teach JFFS2 about Sibley flash
[deliverable/linux.git] / fs / jffs2 / wbuf.c
index 251ac3d86f997f7a014ac0b40088c7515bf91f03..8c06d3a2b17d0d5ae8f8a31b81565ea26bbaaf73 100644 (file)
@@ -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);
+}
This page took 0.070141 seconds and 5 git commands to generate.