diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/core/device.c | 22 | ||||
-rw-r--r-- | drivers/core/root.c | 8 |
2 files changed, 21 insertions, 9 deletions
diff --git a/drivers/core/device.c b/drivers/core/device.c index 22d80694cd8..8d1287f9a19 100644 --- a/drivers/core/device.c +++ b/drivers/core/device.c @@ -41,6 +41,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, struct udevice *dev; struct uclass *uc; int size, ret = 0; + bool auto_seq = true; if (devp) *devp = NULL; @@ -73,6 +74,7 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, dev->seq = -1; dev->req_seq = -1; + dev->sqq = -1; if (CONFIG_IS_ENABLED(DM_SEQ_ALIAS) && (uc->uc_drv->flags & DM_UC_FLAG_SEQ_ALIAS)) { /* @@ -84,17 +86,25 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv, */ if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { - if (uc->uc_drv->name && ofnode_valid(node)) + if (uc->uc_drv->name && ofnode_valid(node)) { + dev_read_alias_seq(dev, &dev->sqq); dev_read_alias_seq(dev, &dev->req_seq); -#if CONFIG_IS_ENABLED(OF_PRIOR_STAGE) - if (dev->req_seq == -1) - dev->req_seq = - uclass_find_next_free_req_seq(uc); -#endif + auto_seq = false; + } + if (CONFIG_IS_ENABLED(OF_PRIOR_STAGE)) { + if (dev->req_seq == -1) { + auto_seq = true; + dev->req_seq = + uclass_find_next_free_req_seq( + uc); + } + } } else { dev->req_seq = uclass_find_next_free_req_seq(uc); } } + if (auto_seq) + dev->sqq = uclass_find_next_free_req_seq(uc); if (drv->plat_auto) { bool alloc = !plat; diff --git a/drivers/core/root.c b/drivers/core/root.c index 672aa7cea72..f2fba5883aa 100644 --- a/drivers/core/root.c +++ b/drivers/core/root.c @@ -311,22 +311,24 @@ int dm_init_and_scan(bool pre_reloc_only) ret = dm_scan_plat(pre_reloc_only); if (ret) { debug("dm_scan_plat() failed: %d\n", ret); - return ret; + goto fail; } if (CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)) { ret = dm_extended_scan(pre_reloc_only); if (ret) { debug("dm_extended_scan() failed: %d\n", ret); - return ret; + goto fail; } } ret = dm_scan_other(pre_reloc_only); if (ret) - return ret; + goto fail; return 0; +fail: + return ret; } #ifdef CONFIG_ACPIGEN |