diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/mtd/mtd.h | 15 | ||||
-rw-r--r-- | include/linux/mtd/partitions.h | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h index 8485e42a9b0..03a1e954c58 100644 --- a/include/linux/mtd/mtd.h +++ b/include/linux/mtd/mtd.h | |||
@@ -110,6 +110,21 @@ struct mtd_oob_ops { | |||
110 | uint8_t *oobbuf; | 110 | uint8_t *oobbuf; |
111 | }; | 111 | }; |
112 | 112 | ||
113 | #define MTD_MAX_OOBFREE_ENTRIES_LARGE 32 | ||
114 | #define MTD_MAX_ECCPOS_ENTRIES_LARGE 448 | ||
115 | #define MTD_MAX_ECCPOS_ENTRIES_OLD 64 /* Previous maximum */ | ||
116 | /* | ||
117 | * Correct ECC layout control structure. This replaces old nand_ecclayout | ||
118 | * (mtd-abi.h) that is exported via ECCGETLAYOUT ioctl. It should be expandable | ||
119 | * in the future simply by the above macros. | ||
120 | */ | ||
121 | struct nand_ecclayout { | ||
122 | __u32 eccbytes; | ||
123 | __u32 eccpos[MTD_MAX_ECCPOS_ENTRIES_LARGE]; | ||
124 | __u32 oobavail; | ||
125 | struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES_LARGE]; | ||
126 | }; | ||
127 | |||
113 | struct mtd_info { | 128 | struct mtd_info { |
114 | u_char type; | 129 | u_char type; |
115 | uint32_t flags; | 130 | uint32_t flags; |
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 274b6196091..930c8ac198d 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
@@ -39,7 +39,7 @@ struct mtd_partition { | |||
39 | uint64_t size; /* partition size */ | 39 | uint64_t size; /* partition size */ |
40 | uint64_t offset; /* offset within the master MTD space */ | 40 | uint64_t offset; /* offset within the master MTD space */ |
41 | uint32_t mask_flags; /* master MTD flags to mask out for this partition */ | 41 | uint32_t mask_flags; /* master MTD flags to mask out for this partition */ |
42 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only)*/ | 42 | struct nand_ecclayout *ecclayout; /* out of band layout for this partition (NAND only) */ |
43 | }; | 43 | }; |
44 | 44 | ||
45 | #define MTDPART_OFS_NXTBLK (-2) | 45 | #define MTDPART_OFS_NXTBLK (-2) |