u-boot-brain/test/dm
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 test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
adc.c test: dm: adc: use the real device name 2019-07-12 21:07:58 -04:00
audio.c dm: sound: Create a uclass for audio codecs 2018-12-13 16:32:49 -07:00
axi.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
blk.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
board.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bus.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cache.c dm: cache: Add enable and disable ops for sandbox and test 2019-09-03 09:31:03 +08:00
clk_ccf.c sandbox: clk: add clk enable/disable test code 2019-08-22 00:10:09 +02:00
clk.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
core.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
cpu.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
dma.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
dsi_host.c dm: Add a dsi host uclass 2019-10-13 23:34:43 +02:00
eth.c dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
fdtdec.c test: fdtdec: test fdtdec_set_carveout() 2020-04-16 08:07:58 -06:00
firmware.c dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
gpio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
hwspinlock.c dm: Add Hardware Spinlock class 2018-12-06 23:26:32 -05:00
i2c.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
i2s.c dm: sound: Create a uclass for i2s 2018-12-13 16:32:49 -07:00
irq.c dm: irq: Add support for requesting interrupts 2020-02-07 22:46:32 +08:00
Kconfig test: Move the unit tests to their own menu 2015-05-21 09:16:17 -04:00
led.c sandbox: led: use new function to configure default state 2018-08-10 10:27:32 -04:00
mailbox.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
Makefile dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
mdio_mux.c test: dm: add a test for MDIO MUX DM uclass 2019-07-18 16:37:13 -05:00
mdio.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
misc.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
mmc.c common: Drop part.h from common header 2020-05-18 17:33:33 -04:00
nop.c dm: Add a No-op uclass 2019-07-05 14:19:41 +02:00
ofnode.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
ofread.c dm: core: add ofnode and dev function to iterate on node property 2020-04-16 23:06:54 -04:00
osd.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
p2sb.c sandbox: Add PCI driver and test for p2sb 2019-12-15 11:44:11 +08:00
panel.c panel: Expand the backlight support 2018-10-09 04:40:27 -06:00
pch.c pch: Add ioctl support 2019-02-20 15:27:08 +08:00
pci_ep.c test: pci_ep: add basic pci_ep tests 2019-07-11 10:05:15 -04:00
pci.c dm: pci: Add a function to read a PCI BAR 2019-10-08 13:57:43 +08:00
phy.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pmc.c x86: sandbox: Add a PMC emulator and test 2019-12-15 11:44:11 +08:00
pmic.c sandbox: tests: Add tests for mc34708 PMIC device 2018-05-18 08:27:26 +02:00
power-domain.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
pwm.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
ram.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
regmap.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
regulator.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
remoteproc.c test: Use ut_asserteq_mem() where possible 2020-05-19 14:01:47 -04:00
reset.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rng.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
rtc.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sf.c sf: Drop spl_flash_get_sw_write_prot 2020-06-01 17:55:24 +05:30
smem.c test: smem: add basic smem test 2018-07-19 17:03:28 -04:00
sound.c sound: Add a new stop_play() method 2020-02-05 19:33:46 -07:00
spi.c test: dm: spi: Fix sandbox dm_test_spi_find() 2020-01-27 22:27:21 +05:30
spmi.c dm: core: Create a new header file for 'compat' features 2020-02-05 19:33:46 -07:00
syscon.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
sysreset.c sandbox: sysreset: Update to support power-on reset 2018-12-05 06:01:34 -07:00
tee.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-driver.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-fdt.c dm: uclass: don't assign aliased seq numbers 2020-06-11 20:52:11 -06:00
test-main.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
test-uclass.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
timer.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
usb.c usb: provide a device tree node to USB devices 2020-06-11 20:52:11 -06:00
video.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
virtio.c test: dm: virtio: Add test cases for virtio uclass 2018-11-14 09:16:28 -08:00
wdt.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00