diff options
author | Andrew Victor <andrew@sanpeople.com> | 2005-02-09 04:17:45 -0500 |
---|---|---|
committer | Thomas Gleixner <tglx@mtd.linutronix.de> | 2005-05-23 06:28:03 -0400 |
commit | 8f15fd55f9bf266139b10850947e19c4e3f4e9b7 (patch) | |
tree | 3df936efbffbbd6c20dd75f51780ac37458285ff /include | |
parent | 3be36675d41a30ed3b192f92684f1417aa0f8bfe (diff) |
[JFFS2] Add support for JFFS2-on-Dataflash devices.
For Dataflash, can_mark_obsolete = false and the NAND write buffering
code (wbuf.c) is used.
Since the DataFlash chip will automatically erase pages when writing,
the cleanmarkers are not needed - so cleanmarker_oob = false and
cleanmarker_size = 0
DataFlash page-sizes are not a power of two (they're multiples of 528
bytes). The SECTOR_ADDR macro (added in the previous core patch) is
replaced with a (slower) div/mod version if CONFIG_JFFS2_FS_DATAFLASH is
selected.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/jffs2_fs_sb.h | 4 | ||||
-rw-r--r-- | include/mtd/mtd-abi.h | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/jffs2_fs_sb.h b/include/linux/jffs2_fs_sb.h index 4afc8d8c2e9e..faec29559fed 100644 --- a/include/linux/jffs2_fs_sb.h +++ b/include/linux/jffs2_fs_sb.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: jffs2_fs_sb.h,v 1.48 2004/11/20 10:41:12 dwmw2 Exp $ */ | 1 | /* $Id: jffs2_fs_sb.h,v 1.49 2005/02/09 09:17:41 pavlov Exp $ */ |
2 | 2 | ||
3 | #ifndef _JFFS2_FS_SB | 3 | #ifndef _JFFS2_FS_SB |
4 | #define _JFFS2_FS_SB | 4 | #define _JFFS2_FS_SB |
@@ -94,7 +94,7 @@ struct jffs2_sb_info { | |||
94 | to an obsoleted node. I don't like this. Alternatives welcomed. */ | 94 | to an obsoleted node. I don't like this. Alternatives welcomed. */ |
95 | struct semaphore erase_free_sem; | 95 | struct semaphore erase_free_sem; |
96 | 96 | ||
97 | #if defined CONFIG_JFFS2_FS_NAND || defined CONFIG_JFFS2_FS_NOR_ECC | 97 | #if defined CONFIG_JFFS2_FS_NAND || defined CONFIG_JFFS2_FS_NOR_ECC || defined CONFIG_JFFS2_FS_DATAFLASH |
98 | /* Write-behind buffer for NAND flash */ | 98 | /* Write-behind buffer for NAND flash */ |
99 | unsigned char *wbuf; | 99 | unsigned char *wbuf; |
100 | uint32_t wbuf_ofs; | 100 | uint32_t wbuf_ofs; |
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index c984cb2c9413..cacb9842b195 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: mtd-abi.h,v 1.9 2005/02/08 17:45:52 nico Exp $ | 2 | * $Id: mtd-abi.h,v 1.10 2005/02/09 09:17:42 pavlov Exp $ |
3 | * | 3 | * |
4 | * Portions of MTD ABI definition which are shared by kernel and user space | 4 | * Portions of MTD ABI definition which are shared by kernel and user space |
5 | */ | 5 | */ |
@@ -29,6 +29,7 @@ struct mtd_oob_buf { | |||
29 | #define MTD_NORFLASH 3 | 29 | #define MTD_NORFLASH 3 |
30 | #define MTD_NANDFLASH 4 | 30 | #define MTD_NANDFLASH 4 |
31 | #define MTD_PEROM 5 | 31 | #define MTD_PEROM 5 |
32 | #define MTD_DATAFLASH 6 | ||
32 | #define MTD_OTHER 14 | 33 | #define MTD_OTHER 14 |
33 | #define MTD_UNKNOWN 15 | 34 | #define MTD_UNKNOWN 15 |
34 | 35 | ||