Kconfig 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. menuconfig MTD_UBI
  2. tristate "Enable UBI - Unsorted block images"
  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. if MTD_UBI
  11. config MTD_UBI_WL_THRESHOLD
  12. int "UBI wear-leveling threshold"
  13. default 4096
  14. range 2 65536
  15. help
  16. This parameter defines the maximum difference between the highest
  17. erase counter value and the lowest erase counter value of eraseblocks
  18. of UBI devices. When this threshold is exceeded, UBI starts performing
  19. wear leveling by means of moving data from eraseblock with low erase
  20. counter to eraseblocks with high erase counter.
  21. The default value should be OK for SLC NAND flashes, NOR flashes and
  22. other flashes which have eraseblock life-cycle 100000 or more.
  23. However, in case of MLC NAND flashes which typically have eraseblock
  24. life-cycle less than 10000, the threshold should be lessened (e.g.,
  25. to 128 or 256, although it does not have to be power of 2).
  26. config MTD_UBI_BEB_LIMIT
  27. int "Maximum expected bad eraseblock count per 1024 eraseblocks"
  28. default 20
  29. range 0 768
  30. help
  31. This option specifies the maximum bad physical eraseblocks UBI
  32. expects on the MTD device (per 1024 eraseblocks). If the underlying
  33. flash does not admit of bad eraseblocks (e.g. NOR flash), this value
  34. is ignored.
  35. NAND datasheets often specify the minimum and maximum NVM (Number of
  36. Valid Blocks) for the flashes' endurance lifetime. The maximum
  37. expected bad eraseblocks per 1024 eraseblocks then can be calculated
  38. as "1024 * (1 - MinNVB / MaxNVB)", which gives 20 for most NANDs
  39. (MaxNVB is basically the total count of eraseblocks on the chip).
  40. To put it differently, if this value is 20, UBI will try to reserve
  41. about 1.9% of physical eraseblocks for bad blocks handling. And that
  42. will be 1.9% of eraseblocks on the entire NAND chip, not just the MTD
  43. partition UBI attaches. This means that if you have, say, a NAND
  44. flash chip admits maximum 40 bad eraseblocks, and it is split on two
  45. MTD partitions of the same size, UBI will reserve 40 eraseblocks when
  46. attaching a partition.
  47. This option can be overridden by the "mtd=" UBI module parameter.
  48. Leave the default value if unsure.
  49. config MTD_UBI_GLUEBI
  50. tristate "MTD devices emulation driver (gluebi)"
  51. help
  52. This option enables gluebi - an additional driver which emulates MTD
  53. devices on top of UBI volumes: for each UBI volumes an MTD device is
  54. created, and all I/O to this MTD device is redirected to the UBI
  55. volume. This is handy to make MTD-oriented software (like JFFS2)
  56. work on top of UBI. Do not enable this unless you use legacy
  57. software.
  58. endif # MTD_UBI