Kconfig 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. # SPDX-License-Identifier: GPL-2.0
  2. config DTC
  3. bool
  4. menuconfig OF
  5. bool "Device Tree and Open Firmware support"
  6. help
  7. This option enables the device tree infrastructure.
  8. It is automatically selected by platforms that need it or can
  9. be enabled manually for unittests, overlays or
  10. compile-coverage.
  11. if OF
  12. config OF_UNITTEST
  13. bool "Device Tree runtime unit tests"
  14. depends on OF_EARLY_FLATTREE
  15. select IRQ_DOMAIN
  16. select OF_RESOLVE
  17. help
  18. This option builds in test cases for the device tree infrastructure
  19. that are executed once at boot time, and the results dumped to the
  20. console.
  21. This option should only be enabled for a development kernel. The tests
  22. will taint the kernel with TAINT_TEST. The tests will cause ERROR and
  23. WARNING messages to print on the console. The tests will cause stack
  24. traces to print on the console. It is possible that the tests will
  25. leave the devicetree in a corrupted state.
  26. The unittest output will be verbose. Copy the output to a file
  27. via capturing the console output or via the dmesg command. Process
  28. this file with scripts/dtc/of_unittest_expect to reduce the
  29. verbosity, test whether expected output is present, and to
  30. summarize the results.
  31. If unsure, say N here. This option is not safe to enable.
  32. config OF_KUNIT_TEST
  33. tristate "Devicetree KUnit Test" if !KUNIT_ALL_TESTS
  34. depends on KUNIT
  35. default KUNIT_ALL_TESTS
  36. help
  37. This option builds KUnit unit tests for device tree infrastructure.
  38. If unsure, say N here, but this option is safe to enable.
  39. config OF_ALL_DTBS
  40. bool "Build all Device Tree Blobs"
  41. depends on COMPILE_TEST
  42. select DTC
  43. help
  44. This option builds all possible Device Tree Blobs (DTBs) for the
  45. current architecture.
  46. If unsure, say N here, but this option is safe to enable.
  47. config OF_FLATTREE
  48. bool
  49. select DTC
  50. select LIBFDT
  51. select CRC32
  52. config OF_EARLY_FLATTREE
  53. def_bool OF && !(SPARC || ALPHA || HEXAGON || M68K || PARISC || S390)
  54. select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM
  55. select OF_FLATTREE
  56. config OF_PROMTREE
  57. bool
  58. config OF_KOBJ
  59. def_bool SYSFS
  60. # Hardly any platforms need this. It is safe to select, but only do so if you
  61. # need it.
  62. config OF_DYNAMIC
  63. bool "Support for dynamic device trees" if OF_UNITTEST
  64. select OF_KOBJ
  65. help
  66. On some platforms, the device tree can be manipulated at runtime.
  67. While this option is selected automatically on such platforms, you
  68. can enable it manually to improve device tree unit test coverage.
  69. config OF_ADDRESS
  70. def_bool y
  71. depends on !SPARC && (HAS_IOMEM || UML)
  72. config OF_IRQ
  73. def_bool y
  74. depends on !SPARC && IRQ_DOMAIN
  75. config OF_RESERVED_MEM
  76. def_bool OF_EARLY_FLATTREE
  77. config OF_RESOLVE
  78. bool
  79. config OF_OVERLAY
  80. bool "Device Tree overlays"
  81. select OF_DYNAMIC
  82. select OF_FLATTREE
  83. select OF_RESOLVE
  84. help
  85. Overlays are a method to dynamically modify part of the kernel's
  86. device tree with dynamically loaded data.
  87. While this option is selected automatically when needed, you can
  88. enable it manually to improve device tree unit test coverage.
  89. config OF_OVERLAY_KUNIT_TEST
  90. tristate "Device Tree overlay KUnit tests" if !KUNIT_ALL_TESTS
  91. depends on KUNIT
  92. default KUNIT_ALL_TESTS
  93. select OF_OVERLAY
  94. help
  95. This option builds KUnit unit tests for the device tree overlay code.
  96. If unsure, say N here, but this option is safe to enable.
  97. config OF_NUMA
  98. bool
  99. endif # OF