diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-15 17:25:15 +1300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-22 19:23:28 +1300 |
commit | 1ef3af3b2717aba9db79879274ab5e1f1d7b2d25 (patch) | |
tree | 20db7bc4bce5c0286f955185de115d92e215a37f /dts | |
parent | 607f9bcb0d0af57c52bacf4d3aeb3a7d389ea206 (diff) | |
download | u-boot-1ef3af3b2717aba9db79879274ab5e1f1d7b2d25.zip u-boot-1ef3af3b2717aba9db79879274ab5e1f1d7b2d25.tar.gz u-boot-1ef3af3b2717aba9db79879274ab5e1f1d7b2d25.tar.bz2 |
dm: core: Allow dropping run-time binding of devices
With OF_PLATDATA_INST devices are bound at build time. We should not need
binding of devices at runtime in most cases. However it is inflexible to
absolutely prohibit it, so add an option to control this.
Update the driver model core so that it does not bind devices. Update
device_bind() to return an error if called.
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 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dts/Kconfig b/dts/Kconfig index c39cc36..d289752 100644 --- a/dts/Kconfig +++ b/dts/Kconfig @@ -371,6 +371,15 @@ config SPL_OF_PLATDATA_INST Declare devices as udevice instances so that they do not need to be bound when U-Boot starts. This can save time and code space. +config SPL_OF_PLATDATA_NO_BIND + bool "Don't allow run-time binding of devices" + depends on SPL_OF_PLATDATA_INST + default y + help + This removes the ability to bind devices at run time, thus saving + some code space in U-Boot. This can be disabled if binding is needed, + at the code of some code size increase. + endif config TPL_OF_PLATDATA @@ -411,6 +420,15 @@ config TPL_OF_PLATDATA_INST Declare devices as udevice instances so that they do not need to be bound when U-Boot starts. This can save time and code space. +config TPL_OF_PLATDATA_NO_BIND + bool "Don't allow run-time binding of devices" + depends on TPL_OF_PLATDATA_INST + default y + help + This removes the ability to bind devices at run time, thus saving + some code space in U-Boot. This can be disabled if binding is needed, + at the code of some code size increase. + endif endmenu |