diff options
author | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-22 17:18:05 -0400 |
---|---|---|
committer | Joern Engel <joern@wh.fh-wedel.de> | 2006-05-22 17:18:05 -0400 |
commit | 28318776a80bc3261f9af91ef79e6e38bb9f5bec (patch) | |
tree | 36ef9144accf19db9d51019aa479807e80aeb8fd /include | |
parent | 8ca9ed5db3aea8d27989c239e8a2f79b839f1e99 (diff) |
[MTD] Introduce writesize
At least two flashes exists that have the concept of a minimum write unit,
similar to NAND pages, but no other NAND characteristics. Therefore, rename
the minimum write unit to "writesize" for all flashes, including NAND.
Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/mtd.h | 7 | ||||
-rw-r--r-- | include/mtd/mtd-abi.h | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 73620ef83364..d48c7492392b 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -66,8 +66,12 @@ struct mtd_info { | |||
66 | * information below if they desire | 66 | * information below if they desire |
67 | */ | 67 | */ |
68 | u_int32_t erasesize; | 68 | u_int32_t erasesize; |
69 | /* Smallest availlable size for writing to the device. For NAND, | ||
70 | * this is the page size, for some NOR chips, the size of ECC | ||
71 | * covered blocks. | ||
72 | */ | ||
73 | u_int32_t writesize; | ||
69 | 74 | ||
70 | u_int32_t oobblock; // Size of OOB blocks (e.g. 512) | ||
71 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) | 75 | u_int32_t oobsize; // Amount of OOB data per block (e.g. 16) |
72 | u_int32_t ecctype; | 76 | u_int32_t ecctype; |
73 | u_int32_t eccsize; | 77 | u_int32_t eccsize; |
@@ -79,7 +83,6 @@ struct mtd_info { | |||
79 | * MTD_PROGRAM_REGIONS flag is set. | 83 | * MTD_PROGRAM_REGIONS flag is set. |
80 | * (Maybe we should have an union for those?) | 84 | * (Maybe we should have an union for those?) |
81 | */ | 85 | */ |
82 | #define MTD_PROGREGION_SIZE(mtd) (mtd)->oobblock | ||
83 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize | 86 | #define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize |
84 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype | 87 | #define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype |
85 | 88 | ||
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index e4d61f33d5bb..520a3b483100 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -63,7 +63,7 @@ struct mtd_info_user { | |||
63 | uint32_t flags; | 63 | uint32_t flags; |
64 | uint32_t size; // Total size of the MTD | 64 | uint32_t size; // Total size of the MTD |
65 | uint32_t erasesize; | 65 | uint32_t erasesize; |
66 | uint32_t oobblock; // Size of OOB blocks (e.g. 512) | 66 | uint32_t writesize; |
67 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) | 67 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) |
68 | uint32_t ecctype; | 68 | uint32_t ecctype; |
69 | uint32_t eccsize; | 69 | uint32_t eccsize; |