diff options
| author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 14:52:07 -0400 |
|---|---|---|
| committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 16:50:41 -0400 |
| commit | 020abf03cd659388f94cb328e1e1df0656e0d7ff (patch) | |
| tree | 40d05011708ad1b4a05928d167eb120420581aa6 /include/linux/mtd/ubi.h | |
| parent | 0ff8fbc61727c926883eec381fbd3d32d1fab504 (diff) | |
| parent | 693d92a1bbc9e42681c42ed190bd42b636ca876f (diff) | |
Merge tag 'v2.6.39-rc7'
in order to pull in changes in drivers/media/dvb/firewire/ and
sound/firewire/.
Diffstat (limited to 'include/linux/mtd/ubi.h')
| -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 | }; |
