[U-Boot] [PATCH 1/2] dm: device: Request next sequence number

Thomas Fitzsimmons fitzsim at fitzsim.org
Sat Sep 14 13:41:38 UTC 2019

Hi Bin,

Bin Meng <bmeng.cn at gmail.com> writes:


> On Fri, Sep 6, 2019 at 7:52 PM Thomas Fitzsimmons <fitzsim at fitzsim.org> wrote:
>> For CONFIG_OF_PRIOR_STAGE, in the absence of a device tree alias for a
>> given device, use the next request number for that type of device.
>> This allows aliases to be used when they're available, while still
>> allowing unaliased devices to be probed.
>> Signed-off-by: Thomas Fitzsimmons <fitzsim at fitzsim.org>
>> Cc: Bin Meng <bmeng.cn at gmail.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> ---
>>  drivers/core/device.c | 5 +++++
>>  drivers/core/uclass.c | 4 +++-
>>  2 files changed, 8 insertions(+), 1 deletion(-)
>> diff --git a/drivers/core/device.c b/drivers/core/device.c
>> index 474c1642ee..ca8be208a9 100644
>> --- a/drivers/core/device.c
>> +++ b/drivers/core/device.c
>> @@ -82,6 +82,11 @@ static int device_bind_common(struct udevice *parent, const struct driver *drv,
>>                         if (uc->uc_drv->name && ofnode_valid(node))
>>                                 dev_read_alias_seq(dev, &dev->req_seq);
> I was wondering whether we should limit such only for OF_PRIOR_STATE,
> instead change the behaviors for all DM devices.

Maybe, though I wouldn't want to break assumptions made in this area by
non-OF_PRIOR_STAGE boards.

> Because as I pointed out in
> https://lists.denx.de/pipermail/u-boot/2019-August/382368.html, it
> seems there are quite some codes in the existing code base that tried
> to workaround such limitation in their own way.

I could create a separate config option to control this behavior, and
document what it does in Kconfig.  Then other ports could adopt it
gradually, and eventually we could make it unconditional.  I think
OF_PRIOR_STAGE should select the new option, since I can confirm this is
an improvement for my OF_PRIOR_STAGE-using board.


More information about the U-Boot mailing list