[PATCH v2 3/3] common: Move autoprobe out to board init

Tom Rini trini at konsulko.com
Fri Nov 1 15:14:07 CET 2024


On Fri, Nov 01, 2024 at 12:50:26PM +0100, Simon Glass wrote:

> Rather than doing autoprobe within the driver model code, move it out to
> the board-init code. This makes it clear that it is a separate step from
> binding devices.
> 
> For now this is always done twice, before and after relocation, but we
> should discuss whether it might be possible to drop the post-relocation
> probe.
> 
> For boards with SPL, the autoprobe is still done there as well.
> 
> Note that with this change, autoprobe happens after the
> EVT_DM_POST_INIT_R/F events are sent, rather than before.
> 
> Update the docs a little, for this feature.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

This commit is where we need:
Link: https://lore.kernel.org/u-boot/20240626235717.272219-1-marex@denx.de/

So that it's easy to go from git to fuller history.

> diff --git a/doc/develop/driver-model/design.rst b/doc/develop/driver-model/design.rst
> index 8c2c81d7ac9..1dcac1408ff 100644
> --- a/doc/develop/driver-model/design.rst
> +++ b/doc/develop/driver-model/design.rst
> @@ -842,6 +842,21 @@ steps (see device_probe()):
>        cause the uclass to do some housekeeping to record the device as
>        activated and 'known' by the uclass.
>  
> +For some platforms, certain devices must be probed to get the platform into
> +a working state. To help with this, drivers marked with
> +``DM_FLAG_PROBE_AFTER_BIND`` will be probed immediately after all devices are
> +bound. For now, this happens in each xPL build as well as in U-Boot proper,
> +both before relocation and after relocation.  See the call to ``dm_autoprobe()``
> +for where this is done.
> +
> +Note that autoprobe happens after the ``EVT_DM_POST_INIT_R`` and
> +``EVT_DM_POST_INIT_F`` events are sent, since these events relate to
> +device-binding.
> +
> +See here for discussion of this feature:
> +
> +:Link: https://patchwork.ozlabs.org/project/uboot/patch/20240626235717.272219-1-marex@denx.de/

There's 40+ messages in the thread (but I know not all of them were
about design), so is the above really a sufficient summary?

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20241101/df1dde7a/attachment.sig>


More information about the U-Boot mailing list