diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:37:31 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 06:37:31 -0400 |
commit | 4cbb9b80e171107c6c34116283fe38e5a396c68b (patch) | |
tree | 9463f2e4774f14752cf4bb52431e14e569256f72 /include | |
parent | 6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (diff) | |
parent | 9fe4854cd1f60273f9a3ece053f4789605f58a5e (diff) |
Merge branch 'master' of /home/tglx/work/kernel/git/mtd-2.6/
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/mtd.h | 7 | ||||
-rw-r--r-- | include/mtd/mtd-abi.h | 15 |
2 files changed, 11 insertions, 11 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 fa2524157846..1e09e4c8f485 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -30,17 +30,14 @@ struct mtd_oob_buf { | |||
30 | #define MTD_NANDFLASH 4 | 30 | #define MTD_NANDFLASH 4 |
31 | #define MTD_DATAFLASH 6 | 31 | #define MTD_DATAFLASH 6 |
32 | 32 | ||
33 | #define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) | 33 | #define MTD_WRITEABLE 0x400 /* Device is writeable */ |
34 | #define MTD_SET_BITS 2 // Bits can be set | 34 | #define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ |
35 | #define MTD_ECC 128 // Device capable of automatic ECC | ||
36 | #define MTD_PROGRAM_REGIONS 512 // Configurable Programming Regions | ||
37 | 35 | ||
38 | // Some common devices / combinations of capabilities | 36 | // Some common devices / combinations of capabilities |
39 | #define MTD_CAP_ROM 0 | 37 | #define MTD_CAP_ROM 0 |
40 | #define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS) | 38 | #define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE) |
41 | #define MTD_CAP_NORFLASH (MTD_CLEAR_BITS) | 39 | #define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) |
42 | #define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS) | 40 | #define MTD_CAP_NANDFLASH (MTD_WRITEABLE) |
43 | #define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) | ||
44 | 41 | ||
45 | 42 | ||
46 | // Types of automatic ECC/Checksum available | 43 | // Types of automatic ECC/Checksum available |
@@ -65,7 +62,7 @@ struct mtd_info_user { | |||
65 | uint32_t flags; | 62 | uint32_t flags; |
66 | uint32_t size; // Total size of the MTD | 63 | uint32_t size; // Total size of the MTD |
67 | uint32_t erasesize; | 64 | uint32_t erasesize; |
68 | uint32_t oobblock; // Size of OOB blocks (e.g. 512) | 65 | uint32_t writesize; |
69 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) | 66 | uint32_t oobsize; // Amount of OOB data per block (e.g. 16) |
70 | uint32_t ecctype; | 67 | uint32_t ecctype; |
71 | uint32_t eccsize; | 68 | uint32_t eccsize; |