blob: 80b5fd44ab1c7f057f36529af36f53da7f805d57 [file] [log] [blame]
Rob Herringaf6074f2017-12-27 12:55:14 -06001# SPDX-License-Identifier: GPL-2.0
Grant Likely5ab5fc72010-07-05 12:02:13 -06002config DTC
3 bool
4
Rob Herring0166dc12015-05-28 12:48:45 -05005menuconfig OF
6 bool "Device Tree and Open Firmware support"
7 help
8 This option enables the device tree infrastructure.
9 It is automatically selected by platforms that need it or can
10 be enabled manually for unittests, overlays or
11 compile-coverage.
Stephen Rothwellbcbefae2010-06-29 12:45:51 +100012
Rob Herring0166dc12015-05-28 12:48:45 -050013if OF
Grant Likely5ab5fc72010-07-05 12:02:13 -060014
Grant Likely19fd7482014-11-04 13:24:45 +000015config OF_UNITTEST
16 bool "Device Tree runtime unit tests"
Rob Herring6019a3d2017-07-25 14:46:56 -050017 depends on !SPARC
18 select IRQ_DOMAIN
Rob Herring649e0a72015-05-28 12:58:02 -050019 select OF_EARLY_FLATTREE
Grant Likely2eb46da2014-10-02 14:36:46 +010020 select OF_RESOLVE
Grant Likely53a42092011-12-12 09:25:57 -070021 help
22 This option builds in test cases for the device tree infrastructure
Geert Uytterhoeven5d927082013-12-24 21:06:01 +010023 that are executed once at boot time, and the results dumped to the
Grant Likely53a42092011-12-12 09:25:57 -070024 console.
25
26 If unsure, say N here, but this option is safe to enable.
27
Rob Herring1b7c5012015-10-06 17:57:33 -050028config OF_ALL_DTBS
29 bool "Build all Device Tree Blobs"
30 depends on COMPILE_TEST
31 select DTC
32 help
33 This option builds all possible Device Tree Blobs (DTBs) for the
34 current architecture.
35
36 If unsure, say N here, but this option is safe to enable.
37
Grant Likelye169cfb2009-11-23 14:53:09 -070038config OF_FLATTREE
39 bool
Grant Likely5ab5fc72010-07-05 12:02:13 -060040 select DTC
Rob Herringe6a69282014-04-02 15:10:14 -050041 select LIBFDT
Ard Biesheuvel08d53aa2014-11-14 18:05:35 +010042 select CRC32
Grant Likelye169cfb2009-11-23 14:53:09 -070043
Stephen Neuendorffere6ce1322010-11-18 15:54:56 -080044config OF_EARLY_FLATTREE
45 bool
Christoph Hellwigff4c25f2019-02-03 20:12:02 +010046 select DMA_DECLARE_COHERENT if HAS_DMA
Stephen Neuendorffere6ce1322010-11-18 15:54:56 -080047 select OF_FLATTREE
48
Andres Salomon3cfc5352010-10-10 21:42:33 -060049config OF_PROMTREE
50 bool
51
Rob Herringb56b5522017-10-04 14:09:40 -050052config OF_KOBJ
53 def_bool SYSFS
54
Grant Likely0f22dd32012-02-15 20:38:40 -070055# Hardly any platforms need this. It is safe to select, but only do so if you
56# need it.
Grant Likelyfcdeb7f2010-01-29 05:04:33 -070057config OF_DYNAMIC
Geert Uytterhoeven121c92c2015-01-23 17:10:04 +010058 bool "Support for dynamic device trees" if OF_UNITTEST
Rob Herringb56b5522017-10-04 14:09:40 -050059 select OF_KOBJ
Geert Uytterhoeven121c92c2015-01-23 17:10:04 +010060 help
61 On some platforms, the device tree can be manipulated at runtime.
62 While this option is selected automatically on such platforms, you
63 can enable it manually to improve device tree unit test coverage.
Grant Likelyfcdeb7f2010-01-29 05:04:33 -070064
Grant Likely6b884a82010-06-08 07:48:09 -060065config OF_ADDRESS
66 def_bool y
Rob Herring6019a3d2017-07-25 14:46:56 -050067 depends on !SPARC && (HAS_IOMEM || UML)
Grant Likely6b884a82010-06-08 07:48:09 -060068
Grant Likelye3873442010-06-18 11:09:59 -060069config OF_IRQ
70 def_bool y
Geert Uytterhoeven63c60e32015-04-05 16:59:24 +020071 depends on !SPARC && IRQ_DOMAIN
Grant Likelye3873442010-06-18 11:09:59 -060072
Marek Szyprowski3f0c8202014-02-28 14:42:48 +010073config OF_RESERVED_MEM
Rob Herring1ee292a2021-05-27 17:32:17 -050074 def_bool OF_EARLY_FLATTREE
Marek Szyprowski3f0c8202014-02-28 14:42:48 +010075
Pantelis Antoniou7941b272014-07-04 19:59:20 +030076config OF_RESOLVE
77 bool
78
Pantelis Antoniou7518b5892014-10-28 22:35:58 +020079config OF_OVERLAY
Matwey V. Kornilov5c776062015-02-15 18:22:47 +030080 bool "Device Tree overlays"
Pantelis Antoniou7518b5892014-10-28 22:35:58 +020081 select OF_DYNAMIC
Frank Rowand39a751a2018-02-12 00:19:42 -080082 select OF_FLATTREE
Pantelis Antoniou7518b5892014-10-28 22:35:58 +020083 select OF_RESOLVE
Geert Uytterhoeven121c92c2015-01-23 17:10:04 +010084 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.
Pantelis Antoniou7518b5892014-10-28 22:35:58 +020089
David Daney298535c2016-04-08 15:50:25 -070090config OF_NUMA
91 bool
92
Michael Ellermandabf6b32020-01-26 22:52:47 +110093config OF_DMA_DEFAULT_COHERENT
94 # arches should select this if DMA is coherent by default for OF devices
95 bool
96
Rob Herring0166dc12015-05-28 12:48:45 -050097endif # OF