summaryrefslogtreecommitdiffstats
path: root/include/linux/mtd
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-22 23:18:05 +0200
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-22 23:18:05 +0200
commit28318776a80bc3261f9af91ef79e6e38bb9f5bec (patch)
tree36ef9144accf19db9d51019aa479807e80aeb8fd /include/linux/mtd
parent8ca9ed5db3aea8d27989c239e8a2f79b839f1e99 (diff)
downloadkernel-crypto-28318776a80bc3261f9af91ef79e6e38bb9f5bec.tar.gz
kernel-crypto-28318776a80bc3261f9af91ef79e6e38bb9f5bec.tar.xz
kernel-crypto-28318776a80bc3261f9af91ef79e6e38bb9f5bec.zip
[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/linux/mtd')
-rw-r--r--include/linux/mtd/mtd.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 73620ef8336..d48c7492392 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -66,8 +66,12 @@ struct mtd_info {
* information below if they desire
*/
u_int32_t erasesize;
+ /* Smallest availlable size for writing to the device. For NAND,
+ * this is the page size, for some NOR chips, the size of ECC
+ * covered blocks.
+ */
+ u_int32_t writesize;
- u_int32_t oobblock; // Size of OOB blocks (e.g. 512)
u_int32_t oobsize; // Amount of OOB data per block (e.g. 16)
u_int32_t ecctype;
u_int32_t eccsize;
@@ -79,7 +83,6 @@ struct mtd_info {
* MTD_PROGRAM_REGIONS flag is set.
* (Maybe we should have an union for those?)
*/
-#define MTD_PROGREGION_SIZE(mtd) (mtd)->oobblock
#define MTD_PROGREGION_CTRLMODE_VALID(mtd) (mtd)->oobsize
#define MTD_PROGREGION_CTRLMODE_INVALID(mtd) (mtd)->ecctype