124 lines · plain
1# SPDX-License-Identifier: GPL-2.02config DTC3 bool4 5menuconfig OF6 bool "Device Tree and Open Firmware support"7 help8 This option enables the device tree infrastructure.9 It is automatically selected by platforms that need it or can10 be enabled manually for unittests, overlays or11 compile-coverage.12 13if OF14 15config OF_UNITTEST16 bool "Device Tree runtime unit tests"17 depends on OF_EARLY_FLATTREE18 select IRQ_DOMAIN19 select OF_RESOLVE20 help21 This option builds in test cases for the device tree infrastructure22 that are executed once at boot time, and the results dumped to the23 console.24 25 This option should only be enabled for a development kernel. The tests26 will taint the kernel with TAINT_TEST. The tests will cause ERROR and27 WARNING messages to print on the console. The tests will cause stack28 traces to print on the console. It is possible that the tests will29 leave the devicetree in a corrupted state.30 31 The unittest output will be verbose. Copy the output to a file32 via capturing the console output or via the dmesg command. Process33 this file with scripts/dtc/of_unittest_expect to reduce the34 verbosity, test whether expected output is present, and to35 summarize the results.36 37 If unsure, say N here. This option is not safe to enable.38 39config OF_KUNIT_TEST40 tristate "Devicetree KUnit Test" if !KUNIT_ALL_TESTS41 depends on KUNIT42 default KUNIT_ALL_TESTS43 help44 This option builds KUnit unit tests for device tree infrastructure.45 46 If unsure, say N here, but this option is safe to enable.47 48config OF_ALL_DTBS49 bool "Build all Device Tree Blobs"50 depends on COMPILE_TEST51 select DTC52 help53 This option builds all possible Device Tree Blobs (DTBs) for the54 current architecture.55 56 If unsure, say N here, but this option is safe to enable.57 58config OF_FLATTREE59 bool60 select DTC61 select LIBFDT62 select CRC3263 64config OF_EARLY_FLATTREE65 def_bool OF && !(SPARC || ALPHA || HEXAGON || M68K || PARISC || S390)66 select DMA_DECLARE_COHERENT if HAS_DMA && HAS_IOMEM67 select OF_FLATTREE68 69config OF_PROMTREE70 bool71 72config OF_KOBJ73 def_bool SYSFS74 75# Hardly any platforms need this. It is safe to select, but only do so if you76# need it.77config OF_DYNAMIC78 bool "Support for dynamic device trees" if OF_UNITTEST79 select OF_KOBJ80 help81 On some platforms, the device tree can be manipulated at runtime.82 While this option is selected automatically on such platforms, you83 can enable it manually to improve device tree unit test coverage.84 85config OF_ADDRESS86 def_bool y87 depends on !SPARC && (HAS_IOMEM || UML)88 89config OF_IRQ90 def_bool y91 depends on !SPARC && IRQ_DOMAIN92 93config OF_RESERVED_MEM94 def_bool OF_EARLY_FLATTREE95 96config OF_RESOLVE97 bool98 99config OF_OVERLAY100 bool "Device Tree overlays"101 select OF_DYNAMIC102 select OF_FLATTREE103 select OF_RESOLVE104 help105 Overlays are a method to dynamically modify part of the kernel's106 device tree with dynamically loaded data.107 While this option is selected automatically when needed, you can108 enable it manually to improve device tree unit test coverage.109 110config OF_OVERLAY_KUNIT_TEST111 tristate "Device Tree overlay KUnit tests" if !KUNIT_ALL_TESTS112 depends on KUNIT113 default KUNIT_ALL_TESTS114 select OF_OVERLAY115 help116 This option builds KUnit unit tests for the device tree overlay code.117 118 If unsure, say N here, but this option is safe to enable.119 120config OF_NUMA121 bool122 123endif # OF124