aboutsummaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorSimon Glass2021-03-15 17:25:36 +1300
committerSimon Glass2021-03-26 17:03:09 +1300
commitab933d802643ca51d276f0f449921a047126f8a1 (patch)
treed984baab5d4daa7057bdfc281cb693db6468500d /dts
parent95a5825f3134ff47f1e0cf37b4014b5c2e2027b5 (diff)
dm: core: Create a struct for device runtime info
At present when driver model needs to change a device it simply updates the struct udevice structure. But with of-platdata-inst most of the fields are not modified at runtime. In fact, typically only the flags need to change. For systems running SPL from read-only memory it is convenient to separate out the runtime information, so that the devices don't need to be copied before being used. Create a new udevice_rt table, similar to the existing driver_rt. For now it just holds the flags, although they are not used in this patch. Add a new Kconfig for the driver_rt data, since this is not needed when of-platdata-inst is used. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r--dts/Kconfig20
1 files changed, 20 insertions, 0 deletions
diff --git a/dts/Kconfig b/dts/Kconfig
index e6bbdc596bd..99ce75e1a2a 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -338,6 +338,7 @@ config SPL_OF_PLATDATA
bool "Generate platform data for use in SPL"
depends on SPL_OF_CONTROL
select DTOC
+ select SPL_OF_PLATDATA_DRIVER_RT if !SPL_OF_PLATDATA_INST
help
For very constrained SPL environments the overhead of decoding
device tree nodes and converting their contents into platform data
@@ -391,12 +392,22 @@ config SPL_OF_PLATDATA_RT
struct udevice (at present just the flags) into a separate struct,
which is allocated at runtime.
+config SPL_OF_PLATDATA_DRIVER_RT
+ bool
+ help
+ Use a separate struct for driver runtime data.
+
+ This enables the driver_rt information, used with of-platdata when
+ of-platdata-inst is not used. It allows finding devices by their
+ driver data.
+
endif
config TPL_OF_PLATDATA
bool "Generate platform data for use in TPL"
depends on TPL_OF_CONTROL
select DTOC
+ select TPL_OF_PLATDATA_DRIVER_RT if !TPL_OF_PLATDATA_INST
help
For very constrained SPL environments the overhead of decoding
device tree nodes and converting their contents into platform data
@@ -451,6 +462,15 @@ config TPL_OF_PLATDATA_RT
struct udevice (at present just the flags) into a separate struct,
which is allocated at runtime.
+config TPL_OF_PLATDATA_DRIVER_RT
+ bool
+ help
+ Use a separate struct for driver runtime data.
+
+ This enables the driver_rt information, used with of-platdata when
+ of-platdata-inst is not used. It allows finding devices by their
+ driver data.
+
endif
endmenu