[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>
This commit is contained in:
Nicolas Pitre
2005-08-06 05:51:33 +01:00
committed by Thomas Gleixner
parent e102d54abf
commit 59da721a22
3 changed files with 46 additions and 5 deletions

View 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);
}