aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/lists.c')
-rw-r--r--drivers/core/lists.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/core/lists.c b/drivers/core/lists.c
index a1677269d8..a1f828463e 100644
--- a/drivers/core/lists.c
+++ b/drivers/core/lists.c
@@ -122,7 +122,8 @@ static int driver_check_compatible(const struct udevice_id *of_match,
122 return -ENOENT; 122 return -ENOENT;
123} 123}
124 124
125int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp) 125int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp,
126 bool pre_reloc_only)
126{ 127{
127 struct driver *driver = ll_entry_start(struct driver, driver); 128 struct driver *driver = ll_entry_start(struct driver, driver);
128 const int n_ents = ll_entry_count(struct driver, driver); 129 const int n_ents = ll_entry_count(struct driver, driver);
@@ -171,6 +172,12 @@ int lists_bind_fdt(struct udevice *parent, ofnode node, struct udevice **devp)
171 if (entry == driver + n_ents) 172 if (entry == driver + n_ents)
172 continue; 173 continue;
173 174
175 if (pre_reloc_only) {
176 if (!dm_ofnode_pre_reloc(node) &&
177 !(entry->flags & DM_FLAG_PRE_RELOC))
178 return 0;
179 }
180
174 pr_debug(" - found match at '%s'\n", entry->name); 181 pr_debug(" - found match at '%s'\n", entry->name);
175 ret = device_bind_with_driver_data(parent, entry, name, 182 ret = device_bind_with_driver_data(parent, entry, name,
176 id->data, node, &dev); 183 id->data, node, &dev);