aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-16 21:20:32 -0700
committerSimon Glass <sjg@chromium.org>2020-12-18 20:32:21 -0700
commit7f20d1d24989fedaad28689c0454f91d44453e80 (patch)
treef185c71d1f3f35bbcbff8fddd6551f05d309ec75 /drivers
parent36c03d183041e57714a909f6d020ac10ef279e3b (diff)
downloadu-boot-7f20d1d24989fedaad28689c0454f91d44453e80.zip
u-boot-7f20d1d24989fedaad28689c0454f91d44453e80.tar.gz
u-boot-7f20d1d24989fedaad28689c0454f91d44453e80.tar.bz2
dm: core: Drop seq and req_seq
Now that migration to the new sequence numbers is complete, drop the old fields. Add a test that covers the new behaviour. Also drop the check for OF_PRIOR_STAGE since we always assign sequence numbers now. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/core/device-remove.c1
-rw-r--r--drivers/core/device.c17
2 files changed, 2 insertions, 16 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 9f7615d..289220b 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -207,7 +207,6 @@ int device_remove(struct udevice *dev, uint flags)
if (flags_remove(flags, drv->flags)) {
device_free(dev);
- dev->seq = -1;
dev->flags &= ~DM_FLAG_ACTIVATED;
}
diff --git a/drivers/core/device.c b/drivers/core/device.c
index 4abb5be..d1a08ce 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -72,30 +72,18 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
dev->driver = drv;
dev->uclass = uc;
- 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)) {
/*
* Some devices, such as a SPI bus, I2C bus and serial ports
* are numbered using aliases.
- *
- * This is just a 'requested' sequence, and will be
- * resolved (and ->seq updated) when the device is probed.
*/
if (CONFIG_IS_ENABLED(OF_CONTROL) &&
!CONFIG_IS_ENABLED(OF_PLATDATA)) {
if (uc->uc_drv->name && ofnode_valid(node)) {
- dev_read_alias_seq(dev, &dev->sqq);
- dev_read_alias_seq(dev, &dev->req_seq);
- auto_seq = false;
- }
- if (CONFIG_IS_ENABLED(OF_PRIOR_STAGE)) {
- if (dev->req_seq == -1) {
- dev->req_seq =
- uclass_find_next_free_seq(uc);
- }
+ if (!dev_read_alias_seq(dev, &dev->sqq))
+ auto_seq = false;
}
}
}
@@ -509,7 +497,6 @@ fail_uclass:
fail:
dev->flags &= ~DM_FLAG_ACTIVATED;
- dev->seq = -1;
device_free(dev);
return ret;