diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/ubi.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/mtd/ubi.h b/include/linux/mtd/ubi.h index b31bd9e9bca3..84854edf4436 100644 --- a/include/linux/mtd/ubi.h +++ b/include/linux/mtd/ubi.h | |||
@@ -116,18 +116,40 @@ struct ubi_volume_info { | |||
116 | * struct ubi_device_info - UBI device description data structure. | 116 | * struct ubi_device_info - UBI device description data structure. |
117 | * @ubi_num: ubi device number | 117 | * @ubi_num: ubi device number |
118 | * @leb_size: logical eraseblock size on this UBI device | 118 | * @leb_size: logical eraseblock size on this UBI device |
119 | * @leb_start: starting offset of logical eraseblocks within physical | ||
120 | * eraseblocks | ||
119 | * @min_io_size: minimal I/O unit size | 121 | * @min_io_size: minimal I/O unit size |
122 | * @max_write_size: maximum amount of bytes the underlying flash can write at a | ||
123 | * time (MTD write buffer size) | ||
120 | * @ro_mode: if this device is in read-only mode | 124 | * @ro_mode: if this device is in read-only mode |
121 | * @cdev: UBI character device major and minor numbers | 125 | * @cdev: UBI character device major and minor numbers |
122 | * | 126 | * |
123 | * Note, @leb_size is the logical eraseblock size offered by the UBI device. | 127 | * Note, @leb_size is the logical eraseblock size offered by the UBI device. |
124 | * Volumes of this UBI device may have smaller logical eraseblock size if their | 128 | * Volumes of this UBI device may have smaller logical eraseblock size if their |
125 | * alignment is not equivalent to %1. | 129 | * alignment is not equivalent to %1. |
130 | * | ||
131 | * The @max_write_size field describes flash write maximum write unit. For | ||
132 | * example, NOR flash allows for changing individual bytes, so @min_io_size is | ||
133 | * %1. However, it does not mean than NOR flash has to write data byte-by-byte. | ||
134 | * Instead, CFI NOR flashes have a write-buffer of, e.g., 64 bytes, and when | ||
135 | * writing large chunks of data, they write 64-bytes at a time. Obviously, this | ||
136 | * improves write throughput. | ||
137 | * | ||
138 | * Also, the MTD device may have N interleaved (striped) flash chips | ||
139 | * underneath, in which case @min_io_size can be physical min. I/O size of | ||
140 | * single flash chip, while @max_write_size can be N * @min_io_size. | ||
141 | * | ||
142 | * The @max_write_size field is always greater or equivalent to @min_io_size. | ||
143 | * E.g., some NOR flashes may have (@min_io_size = 1, @max_write_size = 64). In | ||
144 | * contrast, NAND flashes usually have @min_io_size = @max_write_size = NAND | ||
145 | * page size. | ||
126 | */ | 146 | */ |
127 | struct ubi_device_info { | 147 | struct ubi_device_info { |
128 | int ubi_num; | 148 | int ubi_num; |
129 | int leb_size; | 149 | int leb_size; |
150 | int leb_start; | ||
130 | int min_io_size; | 151 | int min_io_size; |
152 | int max_write_size; | ||
131 | int ro_mode; | 153 | int ro_mode; |
132 | dev_t cdev; | 154 | dev_t cdev; |
133 | }; | 155 | }; |