[PATCH v4 26/42] dm: core: Create a struct for device runtime info
Simon Glass
sjg at chromium.org
Wed Mar 17 02:28:22 CET 2021
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 at chromium.org>
---
(no changes since v2)
Changes in v2:
- Use separate OF_PLATDATA_DRIVER_RT Kconfigs for driver run-time data
- Update the condition for dm_test_of_plat_dev()
drivers/core/root.c | 14 +++++++++++++-
dts/Kconfig | 20 ++++++++++++++++++++
include/asm-generic/global_data.h | 16 ++++++++++++++--
include/dm/device.h | 15 +++++++++++++++
test/dm/of_platdata.c | 2 +-
5 files changed, 63 insertions(+), 4 deletions(-)
Applied to u-boot-dm/next, thanks!
More information about the U-Boot
mailing list