u-boot/drivers/core
Michael Walle be1a6e9425 dm: uclass: don't assign aliased seq numbers
If there are aliases for an uclass, set the base for the "dynamically"
allocated numbers next to the highest alias.

Please note, that this might lead to holes in the sequences, depending
on the device tree. For example if there is only an alias "ethernet1",
the next device seq number would be 2.

In particular this fixes a problem with boards which are using ethernet
aliases but also might have network add-in cards like the E1000. If the
board is started with the add-in card and depending on the order of the
drivers, the E1000 might occupy the first ethernet device and mess up
all the hardware addresses, because the devices are now shifted by one.

Also adapt the test cases to the new handling and add test cases
checking the holes in the seq numbers.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Alex Marginean <alexandru.marginean@nxp.com>
Tested-by: Alex Marginean <alexandru.marginean@nxp.com>
Acked-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Michal Simek <michal.simek@xilinx.com> [on zcu102-revA]
2020-06-11 20:52:11 -06:00
..
acpi.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
device-remove.c dm: core: Add a way to skip powering down power domains 2020-04-16 08:07:58 -06:00
device.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
devres.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dump.c dm: dump.c: Refactor dm_dump_drivers prints 2020-04-09 15:12:34 -06:00
fdtaddr.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Kconfig dm: core: Add basic ACPI support 2020-04-16 14:36:28 +08:00
lists.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
Makefile dm: core: Add basic ACPI support 2020-04-16 14:36:28 +08:00
of_access.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
of_addr.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
of_extra.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ofnode.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
read_extra.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
read.c dm: core: Reorder include files in read.c 2020-05-29 20:55:45 -06:00
regmap.c regmap: Check for out-of-range offsets before mapping them 2020-06-11 20:52:11 -06:00
root.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
simple-bus.c simple-bus: add DM_FLAG_PRE_RELOC flag to simple-bus driver 2019-04-23 20:26:43 -06:00
syscon-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
uclass.c dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
util.c dm: core: remove the duplicated function dm_ofnode_pre_reloc 2020-04-16 08:07:58 -06:00