xref: /openbmc/linux/drivers/mtd/ubi/Kconfig (revision fd589a8f)
1# drivers/mtd/ubi/Kconfig
2
3menu "UBI - Unsorted block images"
4	depends on MTD
5
6config MTD_UBI
7	tristate "Enable UBI"
8	depends on MTD
9	select CRC32
10	help
11	  UBI is a software layer above MTD layer which admits of LVM-like
12	  logical volumes on top of MTD devices, hides some complexities of
13	  flash chips like wear and bad blocks and provides some other useful
14	  capabilities. Please, consult the MTD web site for more details
15	  (www.linux-mtd.infradead.org).
16
17config MTD_UBI_WL_THRESHOLD
18	int "UBI wear-leveling threshold"
19	default 4096
20	range 2 65536
21	depends on MTD_UBI
22	help
23	  This parameter defines the maximum difference between the highest
24	  erase counter value and the lowest erase counter value of eraseblocks
25	  of UBI devices. When this threshold is exceeded, UBI starts performing
26	  wear leveling by means of moving data from eraseblock with low erase
27	  counter to eraseblocks with high erase counter.
28
29	  The default value should be OK for SLC NAND flashes, NOR flashes and
30	  other flashes which have eraseblock life-cycle 100000 or more.
31	  However, in case of MLC NAND flashes which typically have eraseblock
32	  life-cycle less then 10000, the threshold should be lessened (e.g.,
33	  to 128 or 256, although it does not have to be power of 2).
34
35config MTD_UBI_BEB_RESERVE
36	int "Percentage of reserved eraseblocks for bad eraseblocks handling"
37	default 1
38	range 0 25
39	depends on MTD_UBI
40	help
41	  If the MTD device admits of bad eraseblocks (e.g. NAND flash), UBI
42	  reserves some amount of physical eraseblocks to handle new bad
43	  eraseblocks. For example, if a flash physical eraseblock becomes bad,
44	  UBI uses these reserved physical eraseblocks to relocate the bad one.
45	  This option specifies how many physical eraseblocks will be reserved
46	  for bad eraseblock handling (percents of total number of good flash
47	  eraseblocks). If the underlying flash does not admit of bad
48	  eraseblocks (e.g. NOR flash), this value is ignored and nothing is
49	  reserved. Leave the default value if unsure.
50
51config MTD_UBI_GLUEBI
52	tristate "MTD devices emulation driver (gluebi)"
53	default n
54	depends on MTD_UBI
55	help
56	   This option enables gluebi - an additional driver which emulates MTD
57	   devices on top of UBI volumes: for each UBI volumes an MTD device is
58	   created, and all I/O to this MTD device is redirected to the UBI
59	   volume. This is handy to make MTD-oriented software (like JFFS2)
60	   work on top of UBI. Do not enable this unless you use legacy
61	   software.
62
63source "drivers/mtd/ubi/Kconfig.debug"
64endmenu
65