aboutsummaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-08-07 07:24:02 -0600
committerSimon Glass <sjg@chromium.org>2021-09-25 09:46:15 -0600
commiteaad01a3d018a8a5b1003ab2d28e9e23e2b2db3f (patch)
tree797dbb7281a212dd14c5db145e39adab819b0756 /dts
parent7de8bd03c37af6120cf5bba9bf1adb492ed56868 (diff)
downloadu-boot-eaad01a3d018a8a5b1003ab2d28e9e23e2b2db3f.zip
u-boot-eaad01a3d018a8a5b1003ab2d28e9e23e2b2db3f.tar.gz
u-boot-eaad01a3d018a8a5b1003ab2d28e9e23e2b2db3f.tar.bz2
fdt: Create a new OF_REAL Kconfig
The condition to indicate whether there is a runtime devicetree available is OF_CONTROL && !OF_PLATDATA. This is a bit unweidly and is repeated in a lot of places. Add a new OF_REAL Kconfig which provides this information directly. Note: This is similar in effect to LIBFDT. We might consider dropping LIBFDT and using this instead, but this is left for now as we also have OF_LIBFDT_OVERLAY which it would not make sense to change. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r--dts/Kconfig28
1 files changed, 27 insertions, 1 deletions
diff --git a/dts/Kconfig b/dts/Kconfig
index dabe008..d853aaa 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -48,6 +48,14 @@ config OF_CONTROL
This feature provides for run-time configuration of U-Boot
via a flattened device tree.
+config OF_REAL
+ def_bool y
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ OF_CONTROL is enabled in U-Boot proper.
+
config OF_BOARD_FIXUP
bool "Board-specific manipulation of Device Tree"
help
@@ -62,6 +70,7 @@ config SPL_OF_CONTROL
bool "Enable run-time configuration via Device Tree in SPL"
depends on SPL && OF_CONTROL
select SPL_OF_LIBFDT if !SPL_OF_PLATDATA
+ select SPL_OF_REAL if !SPL_OF_PLATDATA
help
Some boards use device tree in U-Boot but only have 4KB of SRAM
which is not enough to support device tree. Disable this option to
@@ -71,6 +80,7 @@ config TPL_OF_CONTROL
bool "Enable run-time configuration via Device Tree in TPL"
depends on TPL && OF_CONTROL
select TPL_OF_LIBFDT if !TPL_OF_PLATDATA
+ select TPL_OF_REAL if !TPL_OF_PLATDATA
help
Some boards use device tree in U-Boot but only have 4KB of SRAM
which is not enough to support device tree. Enable this option to
@@ -236,7 +246,7 @@ config MULTI_DTB_FIT
config SPL_MULTI_DTB_FIT
- depends on SPL_LOAD_FIT && SPL_OF_CONTROL && !SPL_OF_PLATDATA
+ depends on SPL_LOAD_FIT && SPL_OF_REAL
bool "Support embedding several DTBs in a FIT image for the SPL"
help
This option provides the SPL with the ability to select its own
@@ -374,6 +384,14 @@ config SPL_OF_PLATDATA
compatible string, then adding platform data and U_BOOT_DRVINFO
declarations for each node. See of-plat.txt for more information.
+config SPL_OF_REAL
+ bool
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ SPL_OF_CONTROL is enabled and not SPL_OF_PLATDATA
+
if SPL_OF_PLATDATA
config SPL_OF_PLATDATA_PARENT
@@ -421,6 +439,14 @@ config SPL_OF_PLATDATA_DRIVER_RT
endif
+config TPL_OF_REAL
+ bool
+ help
+ Indicates that a real devicetree is available which can be accessed
+ at runtime. This means that dev_read_...() functions can be used to
+ read data from the devicetree for each device. This is true if
+ TPL_OF_CONTROL is enabled and not TPL_OF_PLATDATA
+
config TPL_OF_PLATDATA
bool "Generate platform data for use in TPL"
depends on TPL_OF_CONTROL