summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/driver-model/README.txt4
-rw-r--r--drivers/core/ofnode.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index 6085f927de..36541630a2 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -837,7 +837,9 @@ well, if device tree is enabled there.
It is possible to limit this to specific relocation steps, by using
the more specialized 'u-boot,dm-spl' and 'u-boot,dm-tpl' flags
-in the devicetree.
+in the device tree node. For U-Boot proper you can use 'u-boot,dm-pre-proper'
+which means that it will be processed (and a driver bound) in U-Boot proper
+prior to relocation, but will not be available in SPL or TPL.
Then post relocation we throw that away and re-init driver model again.
For drivers which require some sort of continuity between pre- and
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index fbc67516fc..b7b7ad3a62 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -699,6 +699,8 @@ bool ofnode_pre_reloc(ofnode node)
{
if (ofnode_read_bool(node, "u-boot,dm-pre-reloc"))
return true;
+ if (ofnode_read_bool(node, "u-boot,dm-pre-proper"))
+ return true;
#ifdef CONFIG_TPL_BUILD
if (ofnode_read_bool(node, "u-boot,dm-tpl"))