Kconfig 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  1. menu "RAM/ROM/Flash chip drivers"
  2. depends on MTD!=n
  3. config MTD_CFI
  4. tristate "Detect flash chips by Common Flash Interface (CFI) probe"
  5. select MTD_GEN_PROBE
  6. select MTD_CFI_UTIL
  7. help
  8. The Common Flash Interface specification was developed by Intel,
  9. AMD and other flash manufactures that provides a universal method
  10. for probing the capabilities of flash devices. If you wish to
  11. support any device that is CFI-compliant, you need to enable this
  12. option. Visit <http://www.amd.com/products/nvd/overview/cfi.html>
  13. for more information on CFI.
  14. config MTD_JEDECPROBE
  15. tristate "Detect non-CFI AMD/JEDEC-compatible flash chips"
  16. select MTD_GEN_PROBE
  17. select MTD_CFI_UTIL
  18. help
  19. This option enables JEDEC-style probing of flash chips which are not
  20. compatible with the Common Flash Interface, but will use the common
  21. CFI-targeted flash drivers for any chips which are identified which
  22. are in fact compatible in all but the probe method. This actually
  23. covers most AMD/Fujitsu-compatible chips and also non-CFI
  24. Intel chips.
  25. config MTD_GEN_PROBE
  26. tristate
  27. config MTD_CFI_ADV_OPTIONS
  28. bool "Flash chip driver advanced configuration options"
  29. depends on MTD_GEN_PROBE
  30. help
  31. If you need to specify a specific endianness for access to flash
  32. chips, or if you wish to reduce the size of the kernel by including
  33. support for only specific arrangements of flash chips, say 'Y'. This
  34. option does not directly affect the code, but will enable other
  35. configuration options which allow you to do so.
  36. If unsure, say 'N'.
  37. choice
  38. prompt "Flash cmd/query data swapping"
  39. depends on MTD_CFI_ADV_OPTIONS
  40. default MTD_CFI_NOSWAP
  41. ---help---
  42. This option defines the way in which the CPU attempts to arrange
  43. data bits when writing the 'magic' commands to the chips. Saying
  44. 'NO', which is the default when CONFIG_MTD_CFI_ADV_OPTIONS isn't
  45. enabled, means that the CPU will not do any swapping; the chips
  46. are expected to be wired to the CPU in 'host-endian' form.
  47. Specific arrangements are possible with the BIG_ENDIAN_BYTE and
  48. LITTLE_ENDIAN_BYTE, if the bytes are reversed.
  49. config MTD_CFI_NOSWAP
  50. bool "NO"
  51. config MTD_CFI_BE_BYTE_SWAP
  52. bool "BIG_ENDIAN_BYTE"
  53. config MTD_CFI_LE_BYTE_SWAP
  54. bool "LITTLE_ENDIAN_BYTE"
  55. endchoice
  56. config MTD_CFI_GEOMETRY
  57. bool "Specific CFI Flash geometry selection"
  58. depends on MTD_CFI_ADV_OPTIONS
  59. help
  60. This option does not affect the code directly, but will enable
  61. some other configuration options which would allow you to reduce
  62. the size of the kernel by including support for only certain
  63. arrangements of CFI chips. If unsure, say 'N' and all options
  64. which are supported by the current code will be enabled.
  65. config MTD_MAP_BANK_WIDTH_1
  66. bool "Support 8-bit buswidth" if MTD_CFI_GEOMETRY
  67. default y
  68. help
  69. If you wish to support CFI devices on a physical bus which is
  70. 8 bits wide, say 'Y'.
  71. config MTD_MAP_BANK_WIDTH_2
  72. bool "Support 16-bit buswidth" if MTD_CFI_GEOMETRY
  73. default y
  74. help
  75. If you wish to support CFI devices on a physical bus which is
  76. 16 bits wide, say 'Y'.
  77. config MTD_MAP_BANK_WIDTH_4
  78. bool "Support 32-bit buswidth" if MTD_CFI_GEOMETRY
  79. default y
  80. help
  81. If you wish to support CFI devices on a physical bus which is
  82. 32 bits wide, say 'Y'.
  83. config MTD_MAP_BANK_WIDTH_8
  84. bool "Support 64-bit buswidth" if MTD_CFI_GEOMETRY
  85. default n
  86. help
  87. If you wish to support CFI devices on a physical bus which is
  88. 64 bits wide, say 'Y'.
  89. config MTD_MAP_BANK_WIDTH_16
  90. bool "Support 128-bit buswidth" if MTD_CFI_GEOMETRY
  91. default n
  92. help
  93. If you wish to support CFI devices on a physical bus which is
  94. 128 bits wide, say 'Y'.
  95. config MTD_MAP_BANK_WIDTH_32
  96. bool "Support 256-bit buswidth" if MTD_CFI_GEOMETRY
  97. default n
  98. help
  99. If you wish to support CFI devices on a physical bus which is
  100. 256 bits wide, say 'Y'.
  101. config MTD_CFI_I1
  102. bool "Support 1-chip flash interleave" if MTD_CFI_GEOMETRY
  103. default y
  104. help
  105. If your flash chips are not interleaved - i.e. you only have one
  106. flash chip addressed by each bus cycle, then say 'Y'.
  107. config MTD_CFI_I2
  108. bool "Support 2-chip flash interleave" if MTD_CFI_GEOMETRY
  109. default y
  110. help
  111. If your flash chips are interleaved in pairs - i.e. you have two
  112. flash chips addressed by each bus cycle, then say 'Y'.
  113. config MTD_CFI_I4
  114. bool "Support 4-chip flash interleave" if MTD_CFI_GEOMETRY
  115. default n
  116. help
  117. If your flash chips are interleaved in fours - i.e. you have four
  118. flash chips addressed by each bus cycle, then say 'Y'.
  119. config MTD_CFI_I8
  120. bool "Support 8-chip flash interleave" if MTD_CFI_GEOMETRY
  121. default n
  122. help
  123. If your flash chips are interleaved in eights - i.e. you have eight
  124. flash chips addressed by each bus cycle, then say 'Y'.
  125. config MTD_OTP
  126. bool "Protection Registers aka one-time programmable (OTP) bits"
  127. depends on MTD_CFI_ADV_OPTIONS
  128. default n
  129. help
  130. This enables support for reading, writing and locking so called
  131. "Protection Registers" present on some flash chips.
  132. A subset of them are pre-programmed at the factory with a
  133. unique set of values. The rest is user-programmable.
  134. The user-programmable Protection Registers contain one-time
  135. programmable (OTP) bits; when programmed, register bits cannot be
  136. erased. Each Protection Register can be accessed multiple times to
  137. program individual bits, as long as the register remains unlocked.
  138. Each Protection Register has an associated Lock Register bit. When a
  139. Lock Register bit is programmed, the associated Protection Register
  140. can only be read; it can no longer be programmed. Additionally,
  141. because the Lock Register bits themselves are OTP, when programmed,
  142. Lock Register bits cannot be erased. Therefore, when a Protection
  143. Register is locked, it cannot be unlocked.
  144. This feature should therefore be used with extreme care. Any mistake
  145. in the programming of OTP bits will waste them.
  146. config MTD_CFI_INTELEXT
  147. tristate "Support for CFI command set 0001 (Intel/Sharp chips)"
  148. depends on MTD_GEN_PROBE
  149. select MTD_CFI_UTIL
  150. help
  151. The Common Flash Interface defines a number of different command
  152. sets which a CFI-compliant chip may claim to implement. This code
  153. provides support for command set 0001, used on Intel StrataFlash
  154. and other parts.
  155. config MTD_CFI_AMDSTD
  156. tristate "Support for CFI command set 0002 (AMD/Fujitsu/Spansion chips)"
  157. depends on MTD_GEN_PROBE
  158. select MTD_CFI_UTIL
  159. help
  160. The Common Flash Interface defines a number of different command
  161. sets which a CFI-compliant chip may claim to implement. This code
  162. provides support for command set 0002, used on chips including
  163. the AMD Am29LV320.
  164. config MTD_CFI_STAA
  165. tristate "Support for CFI command set 0020 (ST (Advanced Architecture) chips)"
  166. depends on MTD_GEN_PROBE
  167. select MTD_CFI_UTIL
  168. help
  169. The Common Flash Interface defines a number of different command
  170. sets which a CFI-compliant chip may claim to implement. This code
  171. provides support for command set 0020.
  172. config MTD_CFI_UTIL
  173. tristate
  174. config MTD_RAM
  175. tristate "Support for RAM chips in bus mapping"
  176. help
  177. This option enables basic support for RAM chips accessed through
  178. a bus mapping driver.
  179. config MTD_ROM
  180. tristate "Support for ROM chips in bus mapping"
  181. help
  182. This option enables basic support for ROM chips accessed through
  183. a bus mapping driver.
  184. config MTD_ABSENT
  185. tristate "Support for absent chips in bus mapping"
  186. help
  187. This option enables support for a dummy probing driver used to
  188. allocated placeholder MTD devices on systems that have socketed
  189. or removable media. Use of this driver as a fallback chip probe
  190. preserves the expected registration order of MTD device nodes on
  191. the system regardless of media presence. Device nodes created
  192. with this driver will return -ENODEV upon access.
  193. config MTD_XIP
  194. bool "XIP aware MTD support"
  195. depends on !SMP && (MTD_CFI_INTELEXT || MTD_CFI_AMDSTD) && ARCH_MTD_XIP
  196. default y if XIP_KERNEL
  197. help
  198. This allows MTD support to work with flash memory which is also
  199. used for XIP purposes. If you're not sure what this is all about
  200. then say N.
  201. endmenu