blob: fc4130545a924d7e7c70e7c04ba5ea1d8d449aff [file] [log] [blame]
Masahiro Yamada9fadbc82014-09-22 19:59:05 +09001#
2# Device Tree Control
3#
Masahiro Yamada9fadbc82014-09-22 19:59:05 +09004
5config SUPPORT_OF_CONTROL
6 bool
7
Tom Rini61d0fac2017-09-23 13:00:57 -04008config DTC
9 bool
10
Masahiro Yamada87247af2017-10-17 13:42:44 +090011config PYLIBFDT
12 bool
13
14config DTOC
15 bool
16 select PYLIBFDT
17
18config BINMAN
19 bool
20 select DTOC
21
Bin Mengd72582f2021-05-10 20:23:37 +080022config BINMAN_STANDALONE_FDT
23 bool
24 depends on BINMAN
Ilias Apalodimas554f85e2021-10-12 00:00:15 +030025 default y if OF_BOARD
Bin Mengd72582f2021-05-10 20:23:37 +080026 help
27 This option tells U-Boot build system that a standalone device tree
28 source is explicitly required when using binman to package U-Boot.
29
30 This is not necessary in a common scenario where a device tree source
31 that contains the binman node is provided in the arch/<arch>/dts
32 directory for a specific board. Such device tree sources are built for
33 OF_SEPARATE or OF_EMBED. However for a scenario like the board device
34 tree blob is not provided in the U-Boot build tree, but fed to U-Boot
Ilias Apalodimas554f85e2021-10-12 00:00:15 +030035 in the runtime, e.g.: in the OF_BOARD case that it is passed by
Bin Mengd72582f2021-05-10 20:23:37 +080036 a prior stage bootloader. For such scenario, a standalone device tree
37 blob containing binman node to describe how to package U-Boot should
38 be provided explicitly.
39
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090040menu "Device Tree Control"
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090041 depends on SUPPORT_OF_CONTROL
42
43config OF_CONTROL
44 bool "Run-time configuration via Device Tree"
Tom Rini61d0fac2017-09-23 13:00:57 -040045 select DTC
Sean Anderson08c854a2019-12-17 21:40:09 -050046 select OF_LIBFDT if !OF_PLATDATA
Simon Glass3580f6d2021-08-07 07:24:03 -060047 select OF_REAL if !OF_PLATDATA
Masahiro Yamada9fadbc82014-09-22 19:59:05 +090048 help
49 This feature provides for run-time configuration of U-Boot
50 via a flattened device tree.
51
Simon Glass7c4ba162021-08-07 07:24:02 -060052config OF_REAL
Simon Glass3580f6d2021-08-07 07:24:03 -060053 bool
Simon Glass7c4ba162021-08-07 07:24:02 -060054 help
55 Indicates that a real devicetree is available which can be accessed
56 at runtime. This means that dev_read_...() functions can be used to
57 read data from the devicetree for each device. This is true if
58 OF_CONTROL is enabled in U-Boot proper.
59
mario.six@gdsys.cc7e9b9d62017-02-22 16:07:22 +010060config OF_BOARD_FIXUP
61 bool "Board-specific manipulation of Device Tree"
62 help
63 In certain circumstances it is necessary to be able to modify
64 U-Boot's device tree (e.g. to delete device from it). This option
65 make the Device Tree writeable and provides a board-specific
66 "board_fix_fdt" callback (called during pre-relocation time), which
67 enables the board initialization to modifiy the Device Tree. The
68 modified copy is subsequently used by U-Boot after relocation.
69
Masahiro Yamada1e35f392015-08-12 07:31:54 +090070config SPL_OF_CONTROL
71 bool "Enable run-time configuration via Device Tree in SPL"
72 depends on SPL && OF_CONTROL
Sean Anderson08c854a2019-12-17 21:40:09 -050073 select SPL_OF_LIBFDT if !SPL_OF_PLATDATA
Simon Glass7c4ba162021-08-07 07:24:02 -060074 select SPL_OF_REAL if !SPL_OF_PLATDATA
Simon Glass400d0402015-02-27 22:06:38 -070075 help
76 Some boards use device tree in U-Boot but only have 4KB of SRAM
Walter Lozano7b3d2582019-10-22 11:50:19 -030077 which is not enough to support device tree. Disable this option to
Simon Glass400d0402015-02-27 22:06:38 -070078 allow such boards to be supported by U-Boot SPL.
79
Philipp Tomsich2341dc62017-06-29 11:11:21 +020080config TPL_OF_CONTROL
81 bool "Enable run-time configuration via Device Tree in TPL"
82 depends on TPL && OF_CONTROL
Sean Anderson08c854a2019-12-17 21:40:09 -050083 select TPL_OF_LIBFDT if !TPL_OF_PLATDATA
Simon Glass7c4ba162021-08-07 07:24:02 -060084 select TPL_OF_REAL if !TPL_OF_PLATDATA
Philipp Tomsich2341dc62017-06-29 11:11:21 +020085 help
86 Some boards use device tree in U-Boot but only have 4KB of SRAM
87 which is not enough to support device tree. Enable this option to
88 allow such boards to be supported by U-Boot TPL.
89
Simon Glassa6eedb82017-05-18 20:08:53 -060090config OF_LIVE
91 bool "Enable use of a live tree"
Bin Meng85f737b2021-02-03 21:20:03 +080092 depends on DM && OF_CONTROL
Simon Glassa6eedb82017-05-18 20:08:53 -060093 help
94 Normally U-Boot uses a flat device tree which saves space and
95 avoids the need to unpack the tree before use. However a flat
Michal Simek97a0e492018-08-17 10:16:36 +020096 tree does not support modification from within U-Boot since it
Simon Glassa6eedb82017-05-18 20:08:53 -060097 can invalidate driver-model device tree offsets. This option
98 enables a live tree which is available after relocation,
99 and can be adjusted as needed.
100
Masahiro Yamada9fadbc82014-09-22 19:59:05 +0900101choice
102 prompt "Provider of DTB for DT control"
103 depends on OF_CONTROL
104
105config OF_SEPARATE
106 bool "Separate DTB for DT control"
107 depends on !SANDBOX
108 help
109 If this option is enabled, the device tree will be built and
110 placed as a separate u-boot.dtb file alongside the U-Boot image.
111
112config OF_EMBED
113 bool "Embedded DTB for DT control"
114 help
115 If this option is enabled, the device tree will be picked up and
Simon Glassd9b64ea2015-08-31 18:47:52 -0600116 built into the U-Boot image. This is suitable for local debugging
117 and development only and is not recommended for production devices.
118 Boards in the mainline U-Boot tree should not use it.
Masahiro Yamada9fadbc82014-09-22 19:59:05 +0900119
Alex Deymo5b661ec2017-04-02 01:25:20 -0700120config OF_BOARD
Ilias Apalodimasdc35df42021-10-12 00:00:13 +0300121 bool "Provided by the board (e.g a previous loader) at runtime"
Alex Deymo5b661ec2017-04-02 01:25:20 -0700122 depends on !SANDBOX
123 help
124 If this option is enabled, the device tree will be provided by
125 the board at runtime if the board supports it, instead of being
126 bundled with the image.
127
Masahiro Yamada9fadbc82014-09-22 19:59:05 +0900128config OF_HOSTFILE
129 bool "Host filed DTB for DT control"
130 depends on SANDBOX
131 help
132 If this option is enabled, DTB will be read from a file on startup.
133 This is only useful for Sandbox. Use the -d flag to U-Boot to
134 specify the file to read.
135
136endchoice
137
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +0900138config DEFAULT_DEVICE_TREE
139 string "Default Device Tree for DT control"
Simon Glass644f5bc2016-02-22 22:55:44 -0700140 depends on OF_CONTROL
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +0900141 help
142 This option specifies the default Device Tree used for DT control.
Robert P. J. Dayeb61df52014-10-21 16:44:32 -0400143 It can be overridden from the command line:
Masahiro Yamada8c65b9d2014-09-22 19:59:06 +0900144 $ make DEVICE_TREE=<device-tree-name>
145
Simon Glass963817b2016-02-22 22:55:57 -0700146config OF_LIST
147 string "List of device tree files to include for DT control"
Jean-Jacques Hiblot2037fa42017-09-15 12:57:24 +0200148 depends on SPL_LOAD_FIT || MULTI_DTB_FIT
Michal Simek9b2e95a2016-05-04 15:14:11 +0200149 default DEFAULT_DEVICE_TREE
Simon Glass963817b2016-02-22 22:55:57 -0700150 help
151 This option specifies a list of device tree files to use for DT
Cooper Jr., Franklin06c7b622017-06-16 17:25:09 -0500152 control. These will be packaged into a FIT. At run-time, U-boot
153 or SPL will select the correct DT to use by examining the
154 hardware (e.g. reading a board ID value). This is a list of
155 device tree files (without the directory or .dtb suffix)
156 separated by <space>.
Simon Glass963817b2016-02-22 22:55:57 -0700157
Jean-Jacques Hiblot985cec32019-10-22 16:39:21 +0200158config OF_OVERLAY_LIST
159 string "List of device tree overlays to include for DT control"
160 depends on SPL_LOAD_FIT_APPLY_OVERLAY
161 help
162 This option specifies a list of device tree overlays to use for DT
163 control. This option can then be used by a FIT generator to include
164 the overlays in the FIT image.
165
Marek Vasutaeaa29d2019-03-08 16:06:55 +0100166choice
Baruch Siach45508fc2019-10-07 15:05:47 +0300167 prompt "OF LIST compression"
Marek Vasutaeaa29d2019-03-08 16:06:55 +0100168 depends on MULTI_DTB_FIT
169 default MULTI_DTB_FIT_NO_COMPRESSION
170
171config MULTI_DTB_FIT_LZO
172 bool "LZO"
173 depends on SYS_MALLOC_F
174 select LZO
175 help
176 Compress the FIT image containing the DTBs available for the SPL
177 using LZO compression. (requires lzop on host).
178
179config MULTI_DTB_FIT_GZIP
180 bool "GZIP"
181 depends on SYS_MALLOC_F
182 select GZIP
183 help
184 Compress the FIT image containing the DTBs available for the SPL
185 using GZIP compression. (requires gzip on host)
186
187config MULTI_DTB_FIT_NO_COMPRESSION
188 bool "No compression"
189 help
190 Do not compress the FIT image containing the DTBs available for the SPL.
191 Use this options only if LZO is not available and the DTBs are very small.
192endchoice
193
194choice
195 prompt "Location of uncompressed DTBs"
196 depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO)
197 default MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
198
199config MULTI_DTB_FIT_DYN_ALLOC
200 bool "Dynamically allocate the memory"
201 depends on SYS_MALLOC_F
202
203config MULTI_DTB_FIT_USER_DEFINED_AREA
204 bool "User-defined location"
205endchoice
206
207config MULTI_DTB_FIT_UNCOMPRESS_SZ
208 hex "Size of memory reserved to uncompress the DTBs"
209 depends on (MULTI_DTB_FIT_GZIP || MULTI_DTB_FIT_LZO)
210 default 0x8000
211 help
212 This is the size of this area where the DTBs are uncompressed.
213 If this area is dynamically allocated, make sure that
214 SYS_MALLOC_F_LEN is big enough to contain it.
215
216config MULTI_DTB_FIT_USER_DEF_ADDR
217 hex "Address of memory where dtbs are uncompressed"
218 depends on MULTI_DTB_FIT_USER_DEFINED_AREA
219 help
220 the FIT image containing the DTBs is uncompressed in an area defined
221 at compilation time. This is the address of this area. It must be
222 aligned on 2-byte boundary.
Jean-Jacques Hiblot2037fa42017-09-15 12:57:24 +0200223
224config DTB_RESELECT
225 bool "Support swapping dtbs at a later point in boot"
226 depends on MULTI_DTB_FIT
227 help
228 It is possible during initial boot you may need to use a generic
229 dtb until you can fully determine the board your running on. This
230 config allows boards to implement a function at a later point
231 during boot to switch to the "correct" dtb.
232
233config MULTI_DTB_FIT
234 bool "Support embedding several DTBs in a FIT image for u-boot"
235 help
236 This option provides hooks to allow U-boot to parse an
237 appended FIT image and enable board specific code to then select
238 the correct DTB to be used. Use this if you need to support
239 multiple DTBs but don't use the SPL.
240
Jean-Jacques Hiblota2fee162017-09-15 12:57:32 +0200241
242config SPL_MULTI_DTB_FIT
Simon Glass7c4ba162021-08-07 07:24:02 -0600243 depends on SPL_LOAD_FIT && SPL_OF_REAL
Jean-Jacques Hiblota2fee162017-09-15 12:57:32 +0200244 bool "Support embedding several DTBs in a FIT image for the SPL"
245 help
246 This option provides the SPL with the ability to select its own
247 DTB at runtime from an appended FIT image containing several DTBs.
248 This allows using the same SPL binary on multiple platforms.
249 The primary purpose is to handle different versions of
250 the same platform without tweaking the platform code if the
251 differences can be expressed in the DTBs (common examples are: bus
252 capabilities, pad configurations).
253
254config SPL_OF_LIST
255 string "List of device tree files to include for DT control in SPL"
256 depends on SPL_MULTI_DTB_FIT
257 default OF_LIST
258 help
259 This option specifies a list of device tree files to use for DT
260 control in the SPL. These will be packaged into a FIT. At run-time,
261 the SPL will select the correct DT to use by examining the
262 hardware (e.g. reading a board ID value). This is a list of
263 device tree files (without the directory or .dtb suffix)
264 separated by <space>.
265
266choice
267 prompt "SPL OF LIST compression"
268 depends on SPL_MULTI_DTB_FIT
269 default SPL_MULTI_DTB_FIT_LZO
270
271config SPL_MULTI_DTB_FIT_LZO
272 bool "LZO"
273 depends on SYS_MALLOC_F
274 select SPL_LZO
275 help
276 Compress the FIT image containing the DTBs available for the SPL
277 using LZO compression. (requires lzop on host).
278
279config SPL_MULTI_DTB_FIT_GZIP
280 bool "GZIP"
281 depends on SYS_MALLOC_F
282 select SPL_GZIP
283 help
284 Compress the FIT image containing the DTBs available for the SPL
285 using GZIP compression. (requires gzip on host)
286
287config SPL_MULTI_DTB_FIT_NO_COMPRESSION
288 bool "No compression"
289 help
290 Do not compress the FIT image containing the DTBs available for the SPL.
291 Use this options only if LZO is not available and the DTBs are very small.
292endchoice
293
294choice
Michal Simekc7df3a22018-07-23 08:38:56 +0200295 prompt "Location of uncompressed DTBs"
Jean-Jacques Hiblota2fee162017-09-15 12:57:32 +0200296 depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
297 default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
298
299config SPL_MULTI_DTB_FIT_DYN_ALLOC
300 bool "Dynamically allocate the memory"
301 depends on SYS_MALLOC_F
302
303config SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
304 bool "User-defined location"
305endchoice
306
307config SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ
308 hex "Size of memory reserved to uncompress the DTBs"
309 depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
310 default 0x8000
311 help
312 This is the size of this area where the DTBs are uncompressed.
313 If this area is dynamically allocated, make sure that
314 SPL_SYS_MALLOC_F_LEN is big enough to contain it.
315
316config SPL_MULTI_DTB_FIT_USER_DEF_ADDR
317 hex "Address of memory where dtbs are uncompressed"
318 depends on SPL_MULTI_DTB_FIT_USER_DEFINED_AREA
319 help
320 the FIT image containing the DTBs is uncompressed in an area defined
321 at compilation time. This is the address of this area. It must be
322 aligned on 2-byte boundary.
323
Simon Glass89caf332015-06-23 15:38:29 -0600324config OF_SPL_REMOVE_PROPS
325 string "List of device tree properties to drop for SPL"
Masahiro Yamadaddb9aa972015-08-28 20:28:42 +0900326 depends on SPL_OF_CONTROL
Michal Simekde218072019-02-22 10:50:23 +0100327 default "interrupt-parent interrupts" if SPL_PINCTRL && SPL_CLK
328 default "clocks clock-names interrupt-parent interrupts" if SPL_PINCTRL
329 default "pinctrl-0 pinctrl-names interrupt-parent interrupts" if SPL_CLK
330 default "pinctrl-0 pinctrl-names clocks clock-names interrupt-parent interrupts"
Simon Glass89caf332015-06-23 15:38:29 -0600331 help
332 Since SPL normally runs in a reduced memory space, the device tree
333 is cut down to only what is needed to load and start U-Boot. Only
334 nodes marked with the property "u-boot,dm-pre-reloc" will be
335 included. In addition, some properties are not used by U-Boot and
336 can be discarded. This option defines the list of properties to
337 discard.
338
Anatolij Gustschin08568342020-01-12 15:57:42 +0100339config OF_DTB_PROPS_REMOVE
340 bool "Enable removal of device tree properties"
341 depends on OF_CONTROL
342 help
343 Some boards have restricted amount of storage for U-Boot image.
344 If the generated binary doesn't fit into available image storage,
345 the built-in device tree could probably be cut down by removing
346 some not required device tree properties to reduce the image size.
347 Enable this option and define the properties to be removed in the
348 CONFIG_OF_REMOVE_PROPS list. Do not enable this option if you must
349 pass the built-in DTB directly to the kernel!
350
351config OF_REMOVE_PROPS
352 string "List of device tree properties to drop"
353 depends on OF_DTB_PROPS_REMOVE
354 default "interrupt-parent interrupts" if PINCTRL
355 help
356 Some properties are not used by U-Boot and can be discarded.
357 This option defines the list of properties to discard.
358
Simon Glass7bc65f32016-07-04 11:58:06 -0600359config SPL_OF_PLATDATA
360 bool "Generate platform data for use in SPL"
361 depends on SPL_OF_CONTROL
Masahiro Yamada87247af2017-10-17 13:42:44 +0900362 select DTOC
Simon Glass8beeb282021-03-15 17:25:36 +1300363 select SPL_OF_PLATDATA_DRIVER_RT if !SPL_OF_PLATDATA_INST
Simon Glass7bc65f32016-07-04 11:58:06 -0600364 help
365 For very constrained SPL environments the overhead of decoding
366 device tree nodes and converting their contents into platform data
367 is too large. This overhead includes libfdt code as well as the
368 device tree contents itself. The latter is fairly compact, but the
369 former can add 3KB or more to a Thumb 2 Image.
370
371 This option enables generation of platform data from the device
Simon Glass1d8364a2020-12-28 20:34:54 -0700372 tree as C code. This code creates devices using U_BOOT_DRVINFO()
Simon Glass7bc65f32016-07-04 11:58:06 -0600373 declarations. The benefit is that it allows driver code to access
374 the platform data directly in C structures, avoidin the libfdt
375 overhead.
376
377 This option works by generating C structure declarations for each
Simon Glass1d8364a2020-12-28 20:34:54 -0700378 compatible string, then adding platform data and U_BOOT_DRVINFO
Simon Goldschmidt49ce8ca2019-01-16 20:40:18 +0100379 declarations for each node. See of-plat.txt for more information.
Simon Glass7bc65f32016-07-04 11:58:06 -0600380
Simon Glass7c4ba162021-08-07 07:24:02 -0600381config SPL_OF_REAL
382 bool
383 help
384 Indicates that a real devicetree is available which can be accessed
385 at runtime. This means that dev_read_...() functions can be used to
386 read data from the devicetree for each device. This is true if
387 SPL_OF_CONTROL is enabled and not SPL_OF_PLATDATA
388
Simon Glass240d5f62021-02-03 06:01:13 -0700389if SPL_OF_PLATDATA
390
Simon Glass36b15e22020-10-03 11:31:35 -0600391config SPL_OF_PLATDATA_PARENT
392 bool "Support parent information in devices"
Simon Glass36b15e22020-10-03 11:31:35 -0600393 default y
394 help
395 Generally it is useful to be able to access the parent of a device
396 with of-platdata. To save space this can be disabled, but in that
397 case dev_get_parent() will always return NULL;
398
Simon Glass240d5f62021-02-03 06:01:13 -0700399config SPL_OF_PLATDATA_INST
400 bool "Declare devices at build time"
401 help
402 Declare devices as udevice instances so that they do not need to be
403 bound when U-Boot starts. This can save time and code space.
404
Simon Glass47fd4a22021-03-15 17:25:15 +1300405config SPL_OF_PLATDATA_NO_BIND
406 bool "Don't allow run-time binding of devices"
407 depends on SPL_OF_PLATDATA_INST
408 default y
409 help
410 This removes the ability to bind devices at run time, thus saving
411 some code space in U-Boot. This can be disabled if binding is needed,
412 at the code of some code size increase.
413
Simon Glass5b21b342021-03-15 17:25:35 +1300414config SPL_OF_PLATDATA_RT
415 bool "Use a separate struct for device runtime data"
416 depends on SPL_OF_PLATDATA_INST
417 default y
418 help
419 For systems running SPL from read-only memory it is convenient to
420 separate out the runtime information, so that the devices don't need
421 to be copied before being used. This moves the read-write parts of
422 struct udevice (at present just the flags) into a separate struct,
423 which is allocated at runtime.
424
Simon Glass8beeb282021-03-15 17:25:36 +1300425config SPL_OF_PLATDATA_DRIVER_RT
426 bool
427 help
428 Use a separate struct for driver runtime data.
429
430 This enables the driver_rt information, used with of-platdata when
431 of-platdata-inst is not used. It allows finding devices by their
432 driver data.
433
Simon Glass240d5f62021-02-03 06:01:13 -0700434endif
435
Simon Glass7c4ba162021-08-07 07:24:02 -0600436config TPL_OF_REAL
437 bool
438 help
439 Indicates that a real devicetree is available which can be accessed
440 at runtime. This means that dev_read_...() functions can be used to
441 read data from the devicetree for each device. This is true if
442 TPL_OF_CONTROL is enabled and not TPL_OF_PLATDATA
443
Philipp Tomsich2341dc62017-06-29 11:11:21 +0200444config TPL_OF_PLATDATA
445 bool "Generate platform data for use in TPL"
446 depends on TPL_OF_CONTROL
Masahiro Yamada87247af2017-10-17 13:42:44 +0900447 select DTOC
Simon Glass8beeb282021-03-15 17:25:36 +1300448 select TPL_OF_PLATDATA_DRIVER_RT if !TPL_OF_PLATDATA_INST
Philipp Tomsich2341dc62017-06-29 11:11:21 +0200449 help
450 For very constrained SPL environments the overhead of decoding
451 device tree nodes and converting their contents into platform data
452 is too large. This overhead includes libfdt code as well as the
453 device tree contents itself. The latter is fairly compact, but the
454 former can add 3KB or more to a Thumb 2 Image.
455
456 This option enables generation of platform data from the device
Simon Glass1d8364a2020-12-28 20:34:54 -0700457 tree as C code. This code creates devices using U_BOOT_DRVINFO()
Philipp Tomsich2341dc62017-06-29 11:11:21 +0200458 declarations. The benefit is that it allows driver code to access
459 the platform data directly in C structures, avoidin the libfdt
460 overhead.
461
462 This option works by generating C structure declarations for each
Simon Glass1d8364a2020-12-28 20:34:54 -0700463 compatible string, then adding platform data and U_BOOT_DRVINFO
Simon Goldschmidt49ce8ca2019-01-16 20:40:18 +0100464 declarations for each node. See of-plat.txt for more information.
Philipp Tomsich2341dc62017-06-29 11:11:21 +0200465
Simon Glass240d5f62021-02-03 06:01:13 -0700466if TPL_OF_PLATDATA
467
Simon Glass36b15e22020-10-03 11:31:35 -0600468config TPL_OF_PLATDATA_PARENT
469 bool "Support parent information in devices"
Simon Glass36b15e22020-10-03 11:31:35 -0600470 default y
471 help
472 Generally it is useful to be able to access the parent of a device
473 with of-platdata. To save space this can be disabled, but in that
474 case dev_get_parent() will always return NULL;
475
Simon Glass240d5f62021-02-03 06:01:13 -0700476config TPL_OF_PLATDATA_INST
477 bool "Declare devices at build time"
478
479 help
480 Declare devices as udevice instances so that they do not need to be
481 bound when U-Boot starts. This can save time and code space.
482
Simon Glass47fd4a22021-03-15 17:25:15 +1300483config TPL_OF_PLATDATA_NO_BIND
484 bool "Don't allow run-time binding of devices"
485 depends on TPL_OF_PLATDATA_INST
486 default y
487 help
488 This removes the ability to bind devices at run time, thus saving
489 some code space in U-Boot. This can be disabled if binding is needed,
490 at the code of some code size increase.
491
Simon Glass5b21b342021-03-15 17:25:35 +1300492config TPL_OF_PLATDATA_RT
493 bool "Use a separate struct for device runtime data"
494 depends on TPL_OF_PLATDATA_INST
495 default y
496 help
497 For systems running TPL from read-only memory it is convenient to
498 separate out the runtime information, so that the devices don't need
499 to be copied before being used. This moves the read-write parts of
500 struct udevice (at present just the flags) into a separate struct,
501 which is allocated at runtime.
502
Simon Glass8beeb282021-03-15 17:25:36 +1300503config TPL_OF_PLATDATA_DRIVER_RT
504 bool
505 help
506 Use a separate struct for driver runtime data.
507
508 This enables the driver_rt information, used with of-platdata when
509 of-platdata-inst is not used. It allows finding devices by their
510 driver data.
511
Simon Glass240d5f62021-02-03 06:01:13 -0700512endif
513
Masahiro Yamada9fadbc82014-09-22 19:59:05 +0900514endmenu