diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 12:37:31 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-23 12:37:31 +0200 |
commit | 4cbb9b80e171107c6c34116283fe38e5a396c68b (patch) | |
tree | 9463f2e4774f14752cf4bb52431e14e569256f72 /include | |
parent | 6dfc6d250d0b7ebaa6423c44dcd09fcfe68deabd (diff) | |
parent | 9fe4854cd1f60273f9a3ece053f4789605f58a5e (diff) | |
download | linux-4cbb9b80e171107c6c34116283fe38e5a396c68b.tar.gz linux-4cbb9b80e171107c6c34116283fe38e5a396c68b.tar.bz2 linux-4cbb9b80e171107c6c34116283fe38e5a396c68b.zip |
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 { * 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 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 { #define MTD_NANDFLASH 4 #define MTD_DATAFLASH 6 -#define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) -#define MTD_SET_BITS 2 // Bits can be set -#define MTD_ECC 128 // Device capable of automatic ECC -#define MTD_PROGRAM_REGIONS 512 // Configurable Programming Regions +#define MTD_WRITEABLE 0x400 /* Device is writeable */ +#define MTD_BIT_WRITEABLE 0x800 /* Single bits can be flipped */ // Some common devices / combinations of capabilities #define MTD_CAP_ROM 0 -#define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS) -#define MTD_CAP_NORFLASH (MTD_CLEAR_BITS) -#define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS) -#define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) +#define MTD_CAP_RAM (MTD_WRITEABLE | MTD_BIT_WRITEABLE) +#define MTD_CAP_NORFLASH (MTD_WRITEABLE | MTD_BIT_WRITEABLE) +#define MTD_CAP_NANDFLASH (MTD_WRITEABLE) // Types of automatic ECC/Checksum available @@ -65,7 +62,7 @@ struct mtd_info_user { uint32_t flags; uint32_t size; // Total size of the MTD uint32_t erasesize; - uint32_t oobblock; // Size of OOB blocks (e.g. 512) + uint32_t writesize; uint32_t oobsize; // Amount of OOB data per block (e.g. 16) uint32_t ecctype; uint32_t eccsize; |