[U-Boot] [PATCH v2 02/19] dm: timer: uclass: add timer init to add timer device

Mugunthan V N mugunthanvnm at ti.com
Fri Dec 25 08:08:42 CET 2015


On Friday 25 December 2015 07:40 AM, Bin Meng wrote:
>> +       /* Check for a chosen timer to be used for tick */
>> > +       node = fdtdec_get_chosen_node(blob, "tick-timer");
>> > +       if (node < 0)
>> > +               return -ENODEV;
> This changes now require every device tree provide a "tick-timer"
> under /chosen, which break all the existing dm timer enabled boards,
> and is not necessary.
> 
> We should do:
> 
>     if (node < 0) {
>         ret = uclass_first_device(UCLASS_TIMER, &dev);
>         if (ret)
>             return ret;
>         if (!dev)
>             return -ENODEV;
>         gd->timer = dev;
>     } else {
>     ....
>     }
> 

Oops!, will fix it in next version.

Regards
Mugunthan V N


More information about the U-Boot mailing list