From patchwork Mon Jun 1 23:47:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Walle X-Patchwork-Id: 241499 List-Id: U-Boot discussion From: michael at walle.cc (Michael Walle) Date: Tue, 2 Jun 2020 01:47:06 +0200 Subject: [PATCH v7 0/2] dm: uclass: don't assign aliased seq numbers Message-ID: <20200601234709.31121-1-michael@walle.cc> If there are aliases for an uclass, set the base for the "dynamically" allocated numbers next to the highest alias. The actual patch is 3, the first two patches will fix some breakage which would be introduced with patch 3. changes since v6: - added new patch to fix dev_read_alias_highest_id() changes since v5: - added test cases for usb dt node patch changes since v4: - new patch to fix the ethernet0 alias on Raspberry Pis. This has never been working, but wasn't a problem until recently. Patch 3 changes the allocation of the numbers and reserves possible aliases. changes since v3: - dev_read_alias_highest_id() is only available if CONFIG_OF_CONTROL is set. Thus added an additional condition "CONFIG_IS_ENABLED(OF_CONTROL)", thanks Simon. changes since v2: - adapt/new test cases, thanks Simon changes since v1: - move notice about superfluous commits from commit message to this section. - fix the comment style Michael Walle (3): usb: provide a device tree node to USB devices dm: core: fix dev_read_alias_highest_id() without libfdt dm: uclass: don't assign aliased seq numbers arch/sandbox/dts/test.dts | 13 +++++++++-- drivers/core/uclass.c | 21 +++++++++++++----- drivers/usb/host/usb-uclass.c | 41 ++++++++++++++++++++++++++++++----- include/configs/sandbox.h | 6 ++--- include/dm/read.h | 2 ++ test/dm/eth.c | 14 ++++++------ test/dm/test-fdt.c | 22 ++++++++++++++----- test/dm/usb.c | 22 +++++++++++++++++++ 8 files changed, 113 insertions(+), 28 deletions(-)