Kconfig 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. menu "Generic Driver Options"
  2. config DM
  3. def_bool y
  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 CFG_SYS_SPL_MALLOC_START,
  16. consider using CONFIG_SPL_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 enough. 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 CFG_SYS_SPL_MALLOC_START,
  28. consider using CONFIG_TPL_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 VPL_DM
  35. bool "Enable Driver Model for VPL"
  36. depends on DM && VPL
  37. default y if SPL_DM
  38. help
  39. Enable driver model in VPL. You will need to provide a
  40. suitable malloc() implementation. If you are not using the
  41. full malloc() enabled by CFG_SYS_SPL_MALLOC_START,
  42. consider using CONFIG_SPL_SYS_MALLOC_SIMPLE.
  43. config DM_WARN
  44. bool "Enable warnings in driver model"
  45. depends on DM
  46. default y
  47. help
  48. Enable this to see warnings related to driver model.
  49. Warnings may help with debugging, such as when expected devices do
  50. not bind correctly. If the option is disabled, dm_warn() is compiled
  51. out - it will do nothing when called.
  52. config SPL_DM_WARN
  53. bool "Enable warnings in driver model wuth SPL"
  54. depends on SPL_DM
  55. help
  56. Enable this to see warnings related to driver model in SPL
  57. The dm_warn() function can use up quite a bit of space for its
  58. strings. By default this is disabled for SPL builds to save space.
  59. Warnings may help with debugging, such as when expected devices do
  60. not bind correctly. If the option is disabled, dm_warn() is compiled
  61. out - it will do nothing when called.
  62. config DM_DEBUG
  63. bool "Enable debug messages in driver model core"
  64. depends on DM
  65. help
  66. Say Y here if you want to compile in debug messages in DM core.
  67. config DM_STATS
  68. bool "Collect and show driver model stats"
  69. depends on DM
  70. default y if SANDBOX
  71. help
  72. Enable this to collect and display memory statistics about driver
  73. model. This can help to figure out where all the memory is going and
  74. to find optimisations.
  75. To display the memory stats, use the 'dm mem' command.
  76. config SPL_DM_STATS
  77. bool "Collect and show driver model stats in SPL"
  78. depends on DM_SPL
  79. help
  80. Enable this to collect and display memory statistics about driver
  81. model. This can help to figure out where all the memory is going and
  82. to find optimisations.
  83. The stats are displayed just before SPL boots to the next phase.
  84. config DM_DEVICE_REMOVE
  85. bool "Support device removal"
  86. depends on DM
  87. default y
  88. help
  89. We can save some code space by dropping support for removing a
  90. device.
  91. Note that this may have undesirable results in the USB subsystem as
  92. it causes unplugged devices to linger around in the dm-tree, and it
  93. causes USB host controllers to not be stopped when booting the OS.
  94. config DM_EVENT
  95. bool
  96. depends on DM
  97. select EVENT
  98. help
  99. This enables support for generating events related to driver model
  100. operations, such as prbing or removing a device. Subsystems can
  101. register a 'spy' function that is called when the event occurs. Such
  102. subsystems must select this option.
  103. config SPL_DM_DEVICE_REMOVE
  104. bool "Support device removal in SPL"
  105. depends on SPL_DM
  106. help
  107. We can save some code space by dropping support for removing a
  108. device. This is not normally required in SPL, so by default this
  109. option is disabled for SPL.
  110. config DM_STDIO
  111. bool "Support stdio registration"
  112. depends on DM
  113. default y
  114. help
  115. Normally serial drivers register with stdio so that they can be used
  116. as normal output devices. In SPL we don't normally use stdio, so
  117. we can omit this feature.
  118. config DM_SEQ_ALIAS
  119. bool "Support numbered aliases in device tree"
  120. depends on DM
  121. default y
  122. help
  123. Most boards will have a '/aliases' node containing the path to
  124. numbered devices (e.g. serial0 = &serial0). This feature can be
  125. disabled if it is not required.
  126. config SPL_DM_SEQ_ALIAS
  127. bool "Support numbered aliases in device tree in SPL"
  128. depends on SPL_DM
  129. help
  130. Most boards will have a '/aliases' node containing the path to
  131. numbered devices (e.g. serial0 = &serial0). This feature can be
  132. disabled if it is not required, to save code space in SPL.
  133. config VPL_DM_SEQ_ALIAS
  134. bool "Support numbered aliases in device tree in VPL"
  135. depends on VPL_DM
  136. default y
  137. help
  138. Most boards will have a '/aliases' node containing the path to
  139. numbered devices (e.g. serial0 = &serial0). This feature can be
  140. disabled if it is not required, to save code space in VPL.
  141. config SPL_DM_INLINE_OFNODE
  142. bool "Inline some ofnode functions which are seldom used in SPL"
  143. depends on SPL_DM
  144. default y
  145. help
  146. This applies to several ofnode functions (see ofnode.h) which are
  147. seldom used. Inlining them can help reduce code size.
  148. config TPL_DM_INLINE_OFNODE
  149. bool "Inline some ofnode functions which are seldom used in TPL"
  150. depends on TPL_DM
  151. default y
  152. help
  153. This applies to several ofnode functions (see ofnode.h) which are
  154. seldom used. Inlining them can help reduce code size.
  155. config DM_DMA
  156. bool "Support per-device DMA constraints"
  157. depends on DM
  158. help
  159. Enable this to extract per-device DMA constraints, only supported on
  160. device-tree systems for now. This is needed in order translate
  161. addresses on systems where different buses have different views of
  162. the physical address space.
  163. config REGMAP
  164. bool "Support register maps"
  165. depends on DM
  166. help
  167. Hardware peripherals tend to have one or more sets of registers
  168. which can be accessed to control the hardware. A register map
  169. models this with a simple read/write interface. It can in principle
  170. support any bus type (I2C, SPI) but so far this only supports
  171. direct memory access.
  172. config SPL_REGMAP
  173. bool "Support register maps in SPL"
  174. depends on SPL_DM
  175. help
  176. Hardware peripherals tend to have one or more sets of registers
  177. which can be accessed to control the hardware. A register map
  178. models this with a simple read/write interface. It can in principle
  179. support any bus type (I2C, SPI) but so far this only supports
  180. direct memory access.
  181. config TPL_REGMAP
  182. bool "Support register maps in TPL"
  183. depends on TPL_DM
  184. help
  185. Hardware peripherals tend to have one or more sets of registers
  186. which can be accessed to control the hardware. A register map
  187. models this with a simple read/write interface. It can in principle
  188. support any bus type (I2C, SPI) but so far this only supports
  189. direct memory access.
  190. config VPL_REGMAP
  191. bool "Support register maps in VPL"
  192. depends on VPL_DM
  193. help
  194. Hardware peripherals tend to have one or more sets of registers
  195. which can be accessed to control the hardware. A register map
  196. models this with a simple read/write interface. It can in principle
  197. support any bus type (I2C, SPI) but so far this only supports
  198. direct memory access.
  199. config SYSCON
  200. bool "Support system controllers"
  201. depends on REGMAP
  202. help
  203. Many SoCs have a number of system controllers which are dealt with
  204. as a group by a single driver. Some common functionality is provided
  205. by this uclass, including accessing registers via regmap and
  206. assigning a unique number to each.
  207. config SPL_SYSCON
  208. bool "Support system controllers in SPL"
  209. depends on SPL_REGMAP
  210. help
  211. Many SoCs have a number of system controllers which are dealt with
  212. as a group by a single driver. Some common functionality is provided
  213. by this uclass, including accessing registers via regmap and
  214. assigning a unique number to each.
  215. config TPL_SYSCON
  216. bool "Support system controllers in TPL"
  217. depends on TPL_REGMAP
  218. help
  219. Many SoCs have a number of system controllers which are dealt with
  220. as a group by a single driver. Some common functionality is provided
  221. by this uclass, including accessing registers via regmap and
  222. assigning a unique number to each.
  223. config VPL_SYSCON
  224. bool "Support system controllers in VPL"
  225. depends on VPL_REGMAP
  226. help
  227. Many SoCs have a number of system controllers which are dealt with
  228. as a group by a single driver. Some common functionality is provided
  229. by this uclass, including accessing registers via regmap and
  230. assigning a unique number to each.
  231. config DEVRES
  232. bool "Managed device resources"
  233. depends on DM
  234. help
  235. This option enables the Managed device resources core support.
  236. Device resources managed by the devres framework are automatically
  237. released whether initialization fails half-way or the device gets
  238. detached.
  239. If this option is disabled, devres functions fall back to
  240. non-managed variants. For example, devres_alloc() to kzalloc(),
  241. devm_kmalloc() to kmalloc(), etc.
  242. config DEBUG_DEVRES
  243. bool "Managed device resources debugging functions"
  244. depends on DEVRES
  245. help
  246. If this option is enabled, devres debug messages are printed.
  247. Also, a function is available to dump a list of device resources.
  248. Select this if you are having a problem with devres or want to
  249. debug resource management for a managed device.
  250. If you are unsure about this, Say N here.
  251. config SIMPLE_BUS
  252. bool "Support simple-bus driver"
  253. depends on DM && OF_CONTROL
  254. default y
  255. help
  256. Supports the 'simple-bus' driver, which is used on some systems.
  257. config SPL_SIMPLE_BUS
  258. bool "Support simple-bus driver in SPL"
  259. depends on SPL_DM && SPL_OF_CONTROL
  260. default y
  261. help
  262. Supports the 'simple-bus' driver, which is used on some systems
  263. in SPL.
  264. config TPL_SIMPLE_BUS
  265. bool "Support simple-bus driver in TPL"
  266. depends on TPL_DM && TPL_OF_CONTROL
  267. help
  268. Supports the 'simple-bus' driver, which is used on some systems
  269. in TPL.
  270. config SIMPLE_BUS_CORRECT_RANGE
  271. bool "Decode the 'simple-bus' <range> by honoring the #address-cells and #size-cells"
  272. depends on SIMPLE_BUS
  273. default y if SANDBOX
  274. help
  275. Decoding the 'simple-bus' <range> by honoring the #address-cells
  276. and #size-cells of parent/child bus. If unset, #address-cells of
  277. parent bus is assumed to be 1, #address-cells and #size-cells of
  278. child bus is also assumed to be 1, to save some spaces of using
  279. an advanced API to decode the <range>, which benefits SPL image
  280. builds that have size limits.
  281. If you are unsure about this, Say N here.
  282. config SIMPLE_PM_BUS
  283. bool "Support simple-pm-bus driver"
  284. depends on DM && OF_CONTROL && CLK && POWER_DOMAIN
  285. help
  286. Supports the 'simple-pm-bus' driver, which is used for busses that
  287. have power domains and/or clocks which need to be enabled before use.
  288. config OF_TRANSLATE
  289. bool "Translate addresses using fdt_translate_address"
  290. depends on DM && OF_CONTROL
  291. default y
  292. help
  293. If this option is enabled, the reg property will be translated
  294. using the fdt_translate_address() function. This is necessary
  295. on some platforms (e.g. MVEBU) using complex "ranges"
  296. properties in many nodes. As this translation is not handled
  297. correctly in the default simple_bus_translate() function.
  298. If this option is not enabled, simple_bus_translate() will be
  299. used for the address translation. This function is faster and
  300. smaller in size than fdt_translate_address().
  301. config SPL_OF_TRANSLATE
  302. bool "Translate addresses using fdt_translate_address in SPL"
  303. depends on SPL_DM && SPL_OF_CONTROL
  304. help
  305. If this option is enabled, the reg property will be translated
  306. using the fdt_translate_address() function. This is necessary
  307. on some platforms (e.g. MVEBU) using complex "ranges"
  308. properties in many nodes. As this translation is not handled
  309. correctly in the default simple_bus_translate() function.
  310. If this option is not enabled, simple_bus_translate() will be
  311. used for the address translation. This function is faster and
  312. smaller in size than fdt_translate_address().
  313. config TPL_OF_TRANSLATE
  314. bool "Translate addresses using fdt_translate_address in TPL"
  315. depends on TPL_DM && TPL_OF_CONTROL
  316. help
  317. If this option is enabled, the reg property will be translated
  318. using the fdt_translate_address() function. This is necessary
  319. on some platforms (e.g. MVEBU) using complex "ranges"
  320. properties in many nodes. As this translation is not handled
  321. correctly in the default simple_bus_translate() function.
  322. If this option is not enabled, simple_bus_translate() will be
  323. used for the address translation. This function is faster and
  324. smaller in size than fdt_translate_address()
  325. config VPL_OF_TRANSLATE
  326. bool "Translate addresses using fdt_translate_address in SPL"
  327. depends on SPL_DM && VPL_OF_CONTROL
  328. help
  329. If this option is enabled, the reg property will be translated
  330. using the fdt_translate_address() function. This is necessary
  331. on some platforms (e.g. MVEBU) using complex "ranges"
  332. properties in many nodes. As this translation is not handled
  333. correctly in the default simple_bus_translate() function.
  334. If this option is not enabled, simple_bus_translate() will be
  335. used for the address translation. This function is faster and
  336. smaller in size than fdt_translate_address().
  337. config TRANSLATION_OFFSET
  338. bool "Platforms specific translation offset"
  339. depends on DM && OF_CONTROL
  340. help
  341. Some platforms need a special address translation. Those
  342. platforms (e.g. mvebu in SPL) can configure a translation
  343. offset by enabling this option and setting the translation_offset
  344. variable in the GD in their platform- / board-specific code.
  345. config OF_ISA_BUS
  346. bool
  347. depends on OF_TRANSLATE
  348. help
  349. Is this option is enabled then support for the ISA bus will
  350. be included for addresses read from DT. This is something that
  351. should be known to be required or not based upon the board
  352. being targeted, and whether or not it makes use of an ISA bus.
  353. The bus is matched based upon its node name equalling "isa". The
  354. busses #address-cells should equal 2, with the first cell being
  355. used to hold flags & flag 0x1 indicating that the address range
  356. should be accessed using I/O port in/out accessors. The second
  357. cell holds the offset into ISA bus address space. The #size-cells
  358. property should equal 1, and of course holds the size of the
  359. address range used by a device.
  360. If this option is not enabled then support for the ISA bus is
  361. not included and any such busses used in DT will be treated as
  362. typical simple-bus compatible busses. This will lead to
  363. mistranslation of device addresses, so ensure that this is
  364. enabled if your board does include an ISA bus.
  365. config DM_DEV_READ_INLINE
  366. bool
  367. default y if !OF_LIVE
  368. config OFNODE_MULTI_TREE
  369. bool "Allow the ofnode interface to access any tree"
  370. default y if EVENT && !DM_DEV_READ_INLINE && !DM_INLINE_OFNODE
  371. help
  372. Normally U-Boot makes use of its control FDT, the one used to bind
  373. devices and provide options. In some cases, U-Boot must also process
  374. a separate FDT, e.g. one provided by the operating system, which
  375. needs additions to the /chosen node.
  376. This works fine with live tree (OF_LIVE), but with flat tree the
  377. offset provided in ofnode is only useful with the control FDT. This
  378. option adds a 'tree ID' to the offset, so that multiple trees can
  379. be used. Call oftree_from_fdt() to register a new tree.
  380. config OFNODE_MULTI_TREE_MAX
  381. int "Maximum number of FDTs"
  382. range 2 8
  383. depends on OFNODE_MULTI_TREE
  384. default 4
  385. help
  386. Sets the maximum number of device trees which can be used with the
  387. ofnode interface when using flat trees (OF_LIVE). This is only
  388. available in U-Boot proper and only after relocation.
  389. config ACPIGEN
  390. bool "Support ACPI table generation in driver model"
  391. depends on ACPI
  392. default y if SANDBOX || (GENERATE_ACPI_TABLE && !QEMU)
  393. select LIB_UUID
  394. help
  395. This option enables generation of ACPI tables using driver-model
  396. devices. It adds a new operation struct to each driver, to support
  397. things like generating device-specific tables and returning the ACPI
  398. name of a device.
  399. config BOUNCE_BUFFER
  400. bool "Include bounce buffer API"
  401. help
  402. Some peripherals support DMA from a subset of physically
  403. addressable memory only. To support such peripherals, the
  404. bounce buffer API uses a temporary buffer: it copies data
  405. to/from DMA regions while managing cache operations.
  406. A second possible use of bounce buffers is their ability to
  407. provide aligned buffers for DMA operations.
  408. endmenu