Kconfig 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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. The dm_warn() function can use up quite a bit of space for its
  40. strings. By default this is disabled for SPL builds to save space.
  41. This will cause dm_warn() to be compiled out - it will do nothing
  42. when called.
  43. config DM_DEVICE_REMOVE
  44. bool "Support device removal"
  45. depends on DM
  46. default y
  47. help
  48. We can save some code space by dropping support for removing a
  49. device. This is not normally required in SPL, so by default this
  50. option is disabled for SPL.
  51. Note that this may have undesirable results in the USB subsystem as
  52. it causes unplugged devices to linger around in the dm-tree, and it
  53. causes USB host controllers to not be stopped when booting the OS.
  54. config DM_STDIO
  55. bool "Support stdio registration"
  56. depends on DM
  57. default y
  58. help
  59. Normally serial drivers register with stdio so that they can be used
  60. as normal output devices. In SPL we don't normally use stdio, so
  61. we can omit this feature.
  62. config DM_SEQ_ALIAS
  63. bool "Support numbered aliases in device tree"
  64. depends on DM
  65. default y
  66. help
  67. Most boards will have a '/aliases' node containing the path to
  68. numbered devices (e.g. serial0 = &serial0). This feature can be
  69. disabled if it is not required.
  70. config SPL_DM_SEQ_ALIAS
  71. bool "Support numbered aliases in device tree in SPL"
  72. depends on DM
  73. default n
  74. help
  75. Most boards will have a '/aliases' node containing the path to
  76. numbered devices (e.g. serial0 = &serial0). This feature can be
  77. disabled if it is not required, to save code space in SPL.
  78. config REGMAP
  79. bool "Support register maps"
  80. depends on DM
  81. help
  82. Hardware peripherals tend to have one or more sets of registers
  83. which can be accessed to control the hardware. A register map
  84. models this with a simple read/write interface. It can in principle
  85. support any bus type (I2C, SPI) but so far this only supports
  86. direct memory access.
  87. config SPL_REGMAP
  88. bool "Support register maps in SPL"
  89. depends on DM
  90. help
  91. Hardware peripherals tend to have one or more sets of registers
  92. which can be accessed to control the hardware. A register map
  93. models this with a simple read/write interface. It can in principle
  94. support any bus type (I2C, SPI) but so far this only supports
  95. direct memory access.
  96. config SYSCON
  97. bool "Support system controllers"
  98. depends on REGMAP
  99. help
  100. Many SoCs have a number of system controllers which are dealt with
  101. as a group by a single driver. Some common functionality is provided
  102. by this uclass, including accessing registers via regmap and
  103. assigning a unique number to each.
  104. config SPL_SYSCON
  105. bool "Support system controllers in SPL"
  106. depends on REGMAP
  107. help
  108. Many SoCs have a number of system controllers which are dealt with
  109. as a group by a single driver. Some common functionality is provided
  110. by this uclass, including accessing registers via regmap and
  111. assigning a unique number to each.
  112. config DEVRES
  113. bool "Managed device resources"
  114. depends on DM
  115. help
  116. This option enables the Managed device resources core support.
  117. Device resources managed by the devres framework are automatically
  118. released whether initialization fails half-way or the device gets
  119. detached.
  120. If this option is disabled, devres functions fall back to
  121. non-managed variants. For example, devres_alloc() to kzalloc(),
  122. devm_kmalloc() to kmalloc(), etc.
  123. config DEBUG_DEVRES
  124. bool "Managed device resources debugging functions"
  125. depends on DEVRES
  126. help
  127. If this option is enabled, devres debug messages are printed.
  128. Also, a function is available to dump a list of device resources.
  129. Select this if you are having a problem with devres or want to
  130. debug resource management for a managed device.
  131. If you are unsure about this, Say N here.
  132. config SIMPLE_BUS
  133. bool "Support simple-bus driver"
  134. depends on DM && OF_CONTROL
  135. default y
  136. help
  137. Supports the 'simple-bus' driver, which is used on some systems.
  138. config SPL_SIMPLE_BUS
  139. bool "Support simple-bus driver in SPL"
  140. depends on SPL_DM && SPL_OF_CONTROL
  141. default y
  142. help
  143. Supports the 'simple-bus' driver, which is used on some systems
  144. in SPL.
  145. config OF_TRANSLATE
  146. bool "Translate addresses using fdt_translate_address"
  147. depends on DM && OF_CONTROL
  148. default y
  149. help
  150. If this option is enabled, the reg property will be translated
  151. using the fdt_translate_address() function. This is necessary
  152. on some platforms (e.g. MVEBU) using complex "ranges"
  153. properties in many nodes. As this translation is not handled
  154. correctly in the default simple_bus_translate() function.
  155. If this option is not enabled, simple_bus_translate() will be
  156. used for the address translation. This function is faster and
  157. smaller in size than fdt_translate_address().
  158. config SPL_OF_TRANSLATE
  159. bool "Translate addresses using fdt_translate_address in SPL"
  160. depends on SPL_DM && SPL_OF_CONTROL
  161. default n
  162. help
  163. If this option is enabled, the reg property will be translated
  164. using the fdt_translate_address() function. This is necessary
  165. on some platforms (e.g. MVEBU) using complex "ranges"
  166. properties in many nodes. As this translation is not handled
  167. correctly in the default simple_bus_translate() function.
  168. If this option is not enabled, simple_bus_translate() will be
  169. used for the address translation. This function is faster and
  170. smaller in size than fdt_translate_address().
  171. config OF_ISA_BUS
  172. bool
  173. depends on OF_TRANSLATE
  174. help
  175. Is this option is enabled then support for the ISA bus will
  176. be included for addresses read from DT. This is something that
  177. should be known to be required or not based upon the board
  178. being targetted, and whether or not it makes use of an ISA bus.
  179. The bus is matched based upon its node name equalling "isa". The
  180. busses #address-cells should equal 2, with the first cell being
  181. used to hold flags & flag 0x1 indicating that the address range
  182. should be accessed using I/O port in/out accessors. The second
  183. cell holds the offset into ISA bus address space. The #size-cells
  184. property should equal 1, and of course holds the size of the
  185. address range used by a device.
  186. If this option is not enabled then support for the ISA bus is
  187. not included and any such busses used in DT will be treated as
  188. typical simple-bus compatible busses. This will lead to
  189. mistranslation of device addresses, so ensure that this is
  190. enabled if your board does include an ISA bus.
  191. config DM_DEV_READ_INLINE
  192. bool
  193. default y if !OF_LIVE
  194. endmenu