From 7f20d1d24989fedaad28689c0454f91d44453e80 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 16 Dec 2020 21:20:32 -0700 Subject: 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 --- drivers/core/device-remove.c | 1 - drivers/core/device.c | 17 ++--------------- 2 files changed, 2 insertions(+), 16 deletions(-) (limited to 'drivers') 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; -- cgit v1.1