Kconfig 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. menu "Generic Driver Options"
  2. config DM
  3. bool "Enable Driver Model"
  4. help
  5. This config option enables Driver Model. This brings in the core
  6. support, including scanning of platform data on start-up. If
  7. CONFIG_OF_CONTROL is enabled, the device tree will be scanned also
  8. when available.
  9. config SPL_DM
  10. bool "Enable Driver Model for SPL"
  11. depends on DM && SPL
  12. help
  13. Enable driver model in SPL. You will need to provide a
  14. suitable malloc() implementation. If you are not using the
  15. full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
  16. consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you
  17. must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size.
  18. In most cases driver model will only allocate a few uclasses
  19. and devices in SPL, so 1KB should be enable. See
  20. CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
  21. config TPL_DM
  22. bool "Enable Driver Model for TPL"
  23. depends on DM && TPL
  24. help
  25. Enable driver model in TPL. You will need to provide a
  26. suitable malloc() implementation. If you are not using the
  27. full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
  28. consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you
  29. must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size.
  30. In most cases driver model will only allocate a few uclasses
  31. and devices in SPL, so 1KB should be enough. See
  32. CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
  33. Disable this for very small implementations.
  34. config DM_WARN
  35. bool "Enable warnings in driver model"
  36. depends on DM
  37. default y
  38. help
  39. Enable this to see warnings related to driver model.
  40. Warnings may help with debugging, such as when expected devices do
  41. not bind correctly. If the option is disabled, dm_warn() is compiled
  42. out - it will do nothing when called.
  43. config SPL_DM_WARN
  44. bool "Enable warnings in driver model wuth SPL"
  45. depends on SPL_DM
  46. help
  47. Enable this to see warnings related to driver model in SPL
  48. The dm_warn() function can use up quite a bit of space for its
  49. strings. By default this is disabled for SPL builds to save space.
  50. Warnings may help with debugging, such as when expected devices do
  51. not bind correctly. If the option is disabled, dm_warn() is compiled
  52. out - it will do nothing when called.
  53. config DM_DEBUG
  54. bool "Enable debug messages in driver model core"
  55. depends on DM
  56. help
  57. Say Y here if you want to compile in debug messages in DM core.
  58. config DM_DEVICE_REMOVE
  59. bool "Support device removal"
  60. depends on DM
  61. default y
  62. help
  63. We can save some code space by dropping support for removing a
  64. device.
  65. Note that this may have undesirable results in the USB subsystem as
  66. it causes unplugged devices to linger around in the dm-tree, and it
  67. causes USB host controllers to not be stopped when booting the OS.
  68. config SPL_DM_DEVICE_REMOVE
  69. bool "Support device removal in SPL"
  70. depends on SPL_DM
  71. default n
  72. help
  73. We can save some code space by dropping support for removing a
  74. device. This is not normally required in SPL, so by default this
  75. option is disabled for SPL.
  76. config DM_STDIO
  77. bool "Support stdio registration"
  78. depends on DM
  79. default y
  80. help
  81. Normally serial drivers register with stdio so that they can be used
  82. as normal output devices. In SPL we don't normally use stdio, so
  83. we can omit this feature.
  84. config DM_SEQ_ALIAS
  85. bool "Support numbered aliases in device tree"
  86. depends on DM
  87. default y
  88. help
  89. Most boards will have a '/aliases' node containing the path to
  90. numbered devices (e.g. serial0 = &serial0). This feature can be
  91. disabled if it is not required.
  92. config SPL_DM_SEQ_ALIAS
  93. bool "Support numbered aliases in device tree in SPL"
  94. depends on SPL_DM
  95. default n
  96. help
  97. Most boards will have a '/aliases' node containing the path to
  98. numbered devices (e.g. serial0 = &serial0). This feature can be
  99. disabled if it is not required, to save code space in SPL.
  100. config SPL_DM_INLINE_OFNODE
  101. bool "Inline some ofnode functions which are seldom used in SPL"
  102. depends on SPL_DM
  103. default y
  104. help
  105. This applies to several ofnode functions (see ofnode.h) which are
  106. seldom used. Inlining them can help reduce code size.
  107. config TPL_DM_INLINE_OFNODE
  108. bool "Inline some ofnode functions which are seldom used in TPL"
  109. depends on TPL_DM
  110. default y
  111. help
  112. This applies to several ofnode functions (see ofnode.h) which are
  113. seldom used. Inlining them can help reduce code size.
  114. config DM_DMA
  115. bool "Support per-device DMA constraints"
  116. depends on DM
  117. default n
  118. help
  119. Enable this to extract per-device DMA constraints, only supported on
  120. device-tree systems for now. This is needed in order translate
  121. addresses on systems where different buses have different views of
  122. the physical address space.
  123. config REGMAP
  124. bool "Support register maps"
  125. depends on DM
  126. help
  127. Hardware peripherals tend to have one or more sets of registers
  128. which can be accessed to control the hardware. A register map
  129. models this with a simple read/write interface. It can in principle
  130. support any bus type (I2C, SPI) but so far this only supports
  131. direct memory access.
  132. config SPL_REGMAP
  133. bool "Support register maps in SPL"
  134. depends on SPL_DM
  135. help
  136. Hardware peripherals tend to have one or more sets of registers
  137. which can be accessed to control the hardware. A register map
  138. models this with a simple read/write interface. It can in principle
  139. support any bus type (I2C, SPI) but so far this only supports
  140. direct memory access.
  141. config TPL_REGMAP
  142. bool "Support register maps in TPL"
  143. depends on TPL_DM
  144. help
  145. Hardware peripherals tend to have one or more sets of registers
  146. which can be accessed to control the hardware. A register map
  147. models this with a simple read/write interface. It can in principle
  148. support any bus type (I2C, SPI) but so far this only supports
  149. direct memory access.
  150. config SYSCON
  151. bool "Support system controllers"
  152. depends on REGMAP
  153. help
  154. Many SoCs have a number of system controllers which are dealt with
  155. as a group by a single driver. Some common functionality is provided
  156. by this uclass, including accessing registers via regmap and
  157. assigning a unique number to each.
  158. config SPL_SYSCON
  159. bool "Support system controllers in SPL"
  160. depends on SPL_REGMAP
  161. help
  162. Many SoCs have a number of system controllers which are dealt with
  163. as a group by a single driver. Some common functionality is provided
  164. by this uclass, including accessing registers via regmap and
  165. assigning a unique number to each.
  166. config TPL_SYSCON
  167. bool "Support system controllers in TPL"
  168. depends on TPL_REGMAP
  169. help
  170. Many SoCs have a number of system controllers which are dealt with
  171. as a group by a single driver. Some common functionality is provided
  172. by this uclass, including accessing registers via regmap and
  173. assigning a unique number to each.
  174. config DEVRES
  175. bool "Managed device resources"
  176. depends on DM
  177. help
  178. This option enables the Managed device resources core support.
  179. Device resources managed by the devres framework are automatically
  180. released whether initialization fails half-way or the device gets
  181. detached.
  182. If this option is disabled, devres functions fall back to
  183. non-managed variants. For example, devres_alloc() to kzalloc(),
  184. devm_kmalloc() to kmalloc(), etc.
  185. config DEBUG_DEVRES
  186. bool "Managed device resources debugging functions"
  187. depends on DEVRES
  188. help
  189. If this option is enabled, devres debug messages are printed.
  190. Also, a function is available to dump a list of device resources.
  191. Select this if you are having a problem with devres or want to
  192. debug resource management for a managed device.
  193. If you are unsure about this, Say N here.
  194. config SIMPLE_BUS
  195. bool "Support simple-bus driver"
  196. depends on DM && OF_CONTROL
  197. default y
  198. help
  199. Supports the 'simple-bus' driver, which is used on some systems.
  200. config SPL_SIMPLE_BUS
  201. bool "Support simple-bus driver in SPL"
  202. depends on SPL_DM && SPL_OF_CONTROL
  203. default y
  204. help
  205. Supports the 'simple-bus' driver, which is used on some systems
  206. in SPL.
  207. config SIMPLE_BUS_CORRECT_RANGE
  208. bool "Decode the 'simple-bus' <range> by honoring the #address-cells and #size-cells"
  209. depends on SIMPLE_BUS
  210. default y if SANDBOX
  211. help
  212. Decoding the 'simple-bus' <range> by honoring the #address-cells
  213. and #size-cells of parent/child bus. If unset, #address-cells of
  214. parent bus is assumed to be 1, #address-cells and #size-cells of
  215. child bus is also assumed to be 1, to save some spaces of using
  216. an advanced API to decode the <range>, which benefits SPL image
  217. builds that have size limits.
  218. If you are unsure about this, Say N here.
  219. config SIMPLE_PM_BUS
  220. bool "Support simple-pm-bus driver"
  221. depends on DM && OF_CONTROL && CLK && POWER_DOMAIN
  222. help
  223. Supports the 'simple-pm-bus' driver, which is used for busses that
  224. have power domains and/or clocks which need to be enabled before use.
  225. config OF_TRANSLATE
  226. bool "Translate addresses using fdt_translate_address"
  227. depends on DM && OF_CONTROL
  228. default y
  229. help
  230. If this option is enabled, the reg property will be translated
  231. using the fdt_translate_address() function. This is necessary
  232. on some platforms (e.g. MVEBU) using complex "ranges"
  233. properties in many nodes. As this translation is not handled
  234. correctly in the default simple_bus_translate() function.
  235. If this option is not enabled, simple_bus_translate() will be
  236. used for the address translation. This function is faster and
  237. smaller in size than fdt_translate_address().
  238. config OF_TRANSLATE_ZERO_SIZE_CELLS
  239. bool "Enable translation for zero size cells"
  240. depends on OF_TRANSLATE
  241. default n
  242. help
  243. The routine used to translate an FDT address into a physical CPU
  244. address was developed by IBM. It considers that crossing any level
  245. with #size-cells = <0> makes translation impossible, even if it is
  246. not the way it was specified.
  247. Enabling this option makes translation possible even in the case
  248. of crossing levels with #size-cells = <0>.
  249. config SPL_OF_TRANSLATE
  250. bool "Translate addresses using fdt_translate_address in SPL"
  251. depends on SPL_DM && SPL_OF_CONTROL
  252. default n
  253. help
  254. If this option is enabled, the reg property will be translated
  255. using the fdt_translate_address() function. This is necessary
  256. on some platforms (e.g. MVEBU) using complex "ranges"
  257. properties in many nodes. As this translation is not handled
  258. correctly in the default simple_bus_translate() function.
  259. If this option is not enabled, simple_bus_translate() will be
  260. used for the address translation. This function is faster and
  261. smaller in size than fdt_translate_address().
  262. config TRANSLATION_OFFSET
  263. bool "Platforms specific translation offset"
  264. depends on DM && OF_CONTROL
  265. help
  266. Some platforms need a special address translation. Those
  267. platforms (e.g. mvebu in SPL) can configure a translation
  268. offset by enabling this option and setting the translation_offset
  269. variable in the GD in their platform- / board-specific code.
  270. config OF_ISA_BUS
  271. bool
  272. depends on OF_TRANSLATE
  273. help
  274. Is this option is enabled then support for the ISA bus will
  275. be included for addresses read from DT. This is something that
  276. should be known to be required or not based upon the board
  277. being targeted, and whether or not it makes use of an ISA bus.
  278. The bus is matched based upon its node name equalling "isa". The
  279. busses #address-cells should equal 2, with the first cell being
  280. used to hold flags & flag 0x1 indicating that the address range
  281. should be accessed using I/O port in/out accessors. The second
  282. cell holds the offset into ISA bus address space. The #size-cells
  283. property should equal 1, and of course holds the size of the
  284. address range used by a device.
  285. If this option is not enabled then support for the ISA bus is
  286. not included and any such busses used in DT will be treated as
  287. typical simple-bus compatible busses. This will lead to
  288. mistranslation of device addresses, so ensure that this is
  289. enabled if your board does include an ISA bus.
  290. config DM_DEV_READ_INLINE
  291. bool
  292. default y if !OF_LIVE
  293. config ACPIGEN
  294. bool "Support ACPI table generation in driver model"
  295. default y if SANDBOX || (GENERATE_ACPI_TABLE && !QEMU)
  296. help
  297. This option enables generation of ACPI tables using driver-model
  298. devices. It adds a new operation struct to each driver, to support
  299. things like generating device-specific tables and returning the ACPI
  300. name of a device.
  301. config BOUNCE_BUFFER
  302. bool "Include bounce buffer API"
  303. help
  304. Some peripherals support DMA from a subset of physically
  305. addressable memory only. To support such peripherals, the
  306. bounce buffer API uses a temporary buffer: it copies data
  307. to/from DMA regions while managing cache operations.
  308. A second possible use of bounce buffers is their ability to
  309. provide aligned buffers for DMA operations.
  310. endmenu