diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-15 17:25:35 +1300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-26 17:03:09 +1300 |
commit | 95a5825f3134ff47f1e0cf37b4014b5c2e2027b5 (patch) | |
tree | beb9aa23865aa046e36227e42f3bceddfb18cf8b /dts | |
parent | 6c914e4232cd262001645e932e9156555f1a5823 (diff) | |
download | u-boot-95a5825f3134ff47f1e0cf37b4014b5c2e2027b5.tar.gz |
dm: core: Add an option to support SPL in read-only memory
Some systems (e.g. x86 APL) run SPL from read-only memory. The device
instances created by dtoc are therefore not writeable. To make things work
we would need to copy the devices to read/write memory.
To avoid this, add an option to use a separate runtime struct for devices,
just as is done for drivers. This can be used to hold information that
changes at runtime, avoiding the need for a copy.
Also add a Kconfig option for read-only SPL, which selects this feature.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r-- | dts/Kconfig | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/dts/Kconfig b/dts/Kconfig index d289752a13..e6bbdc596b 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -380,6 +380,17 @@ config SPL_OF_PLATDATA_NO_BIND some code space in U-Boot. This can be disabled if binding is needed, at the code of some code size increase. +config SPL_OF_PLATDATA_RT + bool "Use a separate struct for device runtime data" + depends on SPL_OF_PLATDATA_INST + default y + help + 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. This moves the read-write parts of + struct udevice (at present just the flags) into a separate struct, + which is allocated at runtime. + endif config TPL_OF_PLATDATA @@ -429,6 +440,17 @@ config TPL_OF_PLATDATA_NO_BIND some code space in U-Boot. This can be disabled if binding is needed, at the code of some code size increase. +config TPL_OF_PLATDATA_RT + bool "Use a separate struct for device runtime data" + depends on TPL_OF_PLATDATA_INST + default y + help + For systems running TPL 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. This moves the read-write parts of + struct udevice (at present just the flags) into a separate struct, + which is allocated at runtime. + endif endmenu |