H Hartley Sweeten | 1dd7863 | 2010-08-19 17:28:50 -0700 | [diff] [blame] | 1 | menuconfig MTD_UBI |
| 2 | tristate "Enable UBI - Unsorted block images" |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 3 | select CRC32 |
| 4 | help |
| 5 | UBI is a software layer above MTD layer which admits of LVM-like |
| 6 | logical volumes on top of MTD devices, hides some complexities of |
| 7 | flash chips like wear and bad blocks and provides some other useful |
| 8 | capabilities. Please, consult the MTD web site for more details |
| 9 | (www.linux-mtd.infradead.org). |
| 10 | |
H Hartley Sweeten | 1dd7863 | 2010-08-19 17:28:50 -0700 | [diff] [blame] | 11 | if MTD_UBI |
| 12 | |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 13 | config MTD_UBI_WL_THRESHOLD |
| 14 | int "UBI wear-leveling threshold" |
| 15 | default 4096 |
| 16 | range 2 65536 |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 17 | help |
| 18 | This parameter defines the maximum difference between the highest |
| 19 | erase counter value and the lowest erase counter value of eraseblocks |
| 20 | of UBI devices. When this threshold is exceeded, UBI starts performing |
| 21 | wear leveling by means of moving data from eraseblock with low erase |
Artem Bityutskiy | 6e0c84e | 2008-03-27 17:18:45 +0200 | [diff] [blame] | 22 | counter to eraseblocks with high erase counter. |
| 23 | |
| 24 | The default value should be OK for SLC NAND flashes, NOR flashes and |
| 25 | other flashes which have eraseblock life-cycle 100000 or more. |
| 26 | However, in case of MLC NAND flashes which typically have eraseblock |
Shinya Kuribayashi | 3f50262 | 2010-05-06 19:21:47 +0900 | [diff] [blame] | 27 | life-cycle less than 10000, the threshold should be lessened (e.g., |
Artem Bityutskiy | 6e0c84e | 2008-03-27 17:18:45 +0200 | [diff] [blame] | 28 | to 128 or 256, although it does not have to be power of 2). |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 29 | |
| 30 | config MTD_UBI_BEB_RESERVE |
| 31 | int "Percentage of reserved eraseblocks for bad eraseblocks handling" |
Richard Genoud | 54de1f1 | 2012-06-29 08:57:41 +0200 | [diff] [blame] | 32 | default 2 |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 33 | range 0 25 |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 34 | help |
| 35 | If the MTD device admits of bad eraseblocks (e.g. NAND flash), UBI |
| 36 | reserves some amount of physical eraseblocks to handle new bad |
Shmulik Ladkani | 8beeb3b | 2012-07-04 11:06:00 +0300 | [diff] [blame^] | 37 | eraseblocks. When a physical eraseblock becomes bad, UBI uses these |
| 38 | reserved physical eraseblocks to relocate the bad one. This |
| 39 | configuration option specifies how many physical eraseblocks will be |
| 40 | reserved for bad eraseblock handling (percents of total number of |
| 41 | good physical eraseblocks on this MTD partition). If the underlying |
| 42 | flash does not admit of bad eraseblocks (e.g. NOR flash), this value |
| 43 | is ignored and nothing is reserved. Leave the default value if |
| 44 | unsure. |
| 45 | |
| 46 | config MTD_UBI_BEB_LIMIT |
| 47 | int "Percentage of maximum expected bad eraseblocks" |
| 48 | default 2 |
| 49 | range 0 25 |
| 50 | help |
| 51 | This option specifies the maximum bad physical eraseblocks UBI |
| 52 | expects on the UBI device (percents of total number of physical |
| 53 | eraseblocks on this MTD partition). If the underlying flash does not |
| 54 | admit of bad eraseblocks (e.g. NOR flash), this value is ignored. |
| 55 | Leave the default value if unsure. |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 56 | |
| 57 | config MTD_UBI_GLUEBI |
Dmitry Pervushin | 2ba3d76 | 2009-05-31 18:32:59 +0400 | [diff] [blame] | 58 | tristate "MTD devices emulation driver (gluebi)" |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 59 | help |
Dmitry Pervushin | 2ba3d76 | 2009-05-31 18:32:59 +0400 | [diff] [blame] | 60 | This option enables gluebi - an additional driver which emulates MTD |
| 61 | devices on top of UBI volumes: for each UBI volumes an MTD device is |
| 62 | created, and all I/O to this MTD device is redirected to the UBI |
| 63 | volume. This is handy to make MTD-oriented software (like JFFS2) |
| 64 | work on top of UBI. Do not enable this unless you use legacy |
| 65 | software. |
Artem B. Bityutskiy | 801c135 | 2006-06-27 12:22:22 +0400 | [diff] [blame] | 66 | |
H Hartley Sweeten | 1dd7863 | 2010-08-19 17:28:50 -0700 | [diff] [blame] | 67 | endif # MTD_UBI |