[U-Boot] [U-Boot-DM] Feedback: Device probe during boot
Wolfgang Denk
wd at denx.de
Fri Nov 2 09:52:22 UTC 2018
Dear Vabhav,
In message <VI1PR04MB480059394276E5984161DD12F3CF0 at VI1PR04MB4800.eurprd04.prod.outlook.com> you wrote:
>
> Referring '[PATCH] drivers: serial: probe all serial devices'
> email regarding unified way to probe device during boot using DM
> model
>
> I would like to take this thread forward and request your time to
> help identify the design framework
>
> 1. In dm_init(),
> * Identify the class of devices to be probed
> * Call dm_set_uclass_autoprobe(enum uclass_id, bool)
> 2. In core file on every device class
> * uclass_next_device() to iterate through next device
This design is inherently wrong. As explained multiple times
before, probing for all possible devices just costs a lot of
resources (boot time, memory) for no good. U-Boot uses lazy
initialization - only when a device is really accessed, it will be
initialized.
This is the way it has been designed so far, and I see no reason to
change this design principle. If there are drivers where this does
not work for some reason, then these drivers shall be fixed /
improved.
> There would be config option to choose probe all devices or not
Can you please explain which use case you see where the blind
initialization of all devices would be needed, no matter if they are
used at all or not? I cannot think of any such case.
And we have plenty example of "commercial" boot loaders which spend
some 20+ seconds just to enumerate all devices on all available USB
busses even if USB is not used at all for booting. This is NOT the
way to go!
> Let me know your time if I can schedule skype session for further discussion
Please understand that U-Boot discussionis taking place here on the
mailing list. We do not use skype at all.
Thanks!
Wolfgang Denk
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The price of success is hard work, dedication to the job at hand, and
the determination that whether we win or lose, we have applied the
best of ourselves to the task at hand. - Vince Lombardi
More information about the U-Boot
mailing list