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