[U-Boot] [RFC PATCH v3 01/14] dm: core: Allow seq numbers to be resolved before probe

Simon Glass sjg at chromium.org
Wed Feb 11 05:39:22 CET 2015


Hi Joe,

On 10 February 2015 at 18:30, Joe Hershberger <joe.hershberger at ni.com> wrote:
> Before this patch, if the sequence numbers were resolved before probe,
> this code would insist on defining new non-conflicting-with-itself seq
> numbers. Now any "non -1" seq number is accepted as already resolved.

Can you explain what problem this solves? At present, when probing a
device, ->seq must be -1 (sort-of by definition since it doesn't exist
as an active device in the uclass).

>
> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
>
> ---
>
> Changes in v3:
> -Add seq patch to dm core
>
> Changes in v2: None
>
>  drivers/core/uclass.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
> index 289a5d2..2d8b6f8 100644
> --- a/drivers/core/uclass.c
> +++ b/drivers/core/uclass.c
> @@ -366,7 +366,9 @@ int uclass_resolve_seq(struct udevice *dev)
>         int seq;
>         int ret;
>
> -       assert(dev->seq == -1);
> +       if (dev->seq != -1)
> +               return dev->seq;
> +
>         ret = uclass_find_device_by_seq(dev->uclass->uc_drv->id, dev->req_seq,
>                                         false, &dup);
>         if (!ret) {
> --
> 1.7.11.5
>

Regards,
Simon


More information about the U-Boot mailing list