diff options
author | Tom Rini <trini@konsulko.com> | 2025-03-30 09:10:57 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-03-30 09:11:07 -0600 |
commit | f1895bc1e71c18fb872e2fec40ff2310d6b4a0bb (patch) | |
tree | d1a588eb9f90acb777eff6be184f8dca36d504b2 | |
parent | 5ca70325b64f760bf4190f206a0e88dda495e3d2 (diff) | |
parent | 44450434ea9f0f2e0d8ddfd853f4990c1719b4aa (diff) |
Merge patch series "Clarify DM_FLAG_PROBE_AFTER_BIND behaviour"
Caleb Connolly <caleb.connolly@linaro.org> says:
In Simon's series reworking autoprobe, a discussion came up about
DM_FLAG_PROBE_AFTER_BIND, specifically that it wasn't very clear where
this flag should be used.
This series implements my suggestions made there to clarify the use of
this flag, and fixup the two driver which erroneously apply it to their
driver struct (this does nothing).
Link: https://lore.kernel.org/u-boot/20241120153642.861633-1-sjg@chromium.org/
Link: https://lore.kernel.org/r/20250117-clarify-probe-after-bind-v1-0-273f046ce5dd@linaro.org
-rw-r--r-- | doc/develop/driver-model/design.rst | 6 | ||||
-rw-r--r-- | drivers/mailbox/zynqmp-ipi.c | 1 | ||||
-rw-r--r-- | drivers/watchdog/da9063-wdt.c | 1 | ||||
-rw-r--r-- | include/dm/device.h | 5 |
4 files changed, 8 insertions, 5 deletions
diff --git a/doc/develop/driver-model/design.rst b/doc/develop/driver-model/design.rst index 92f638a0204..30093737200 100644 --- a/doc/develop/driver-model/design.rst +++ b/doc/develop/driver-model/design.rst @@ -843,8 +843,10 @@ steps (see device_probe()): 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 +a working state. To help with this, devices marked with DM_FLAG_PROBE_AFTER_BIND +will be probed immediately after all devices are bound. This flag must be set +on the device in its ``bind()`` function with +``dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND)``. For now, this happens in SPL, before relocation and after relocation. See the call to ``dm_autoprobe()`` for where this is done. diff --git a/drivers/mailbox/zynqmp-ipi.c b/drivers/mailbox/zynqmp-ipi.c index 713d93a200c..851aa737c03 100644 --- a/drivers/mailbox/zynqmp-ipi.c +++ b/drivers/mailbox/zynqmp-ipi.c @@ -270,5 +270,4 @@ U_BOOT_DRIVER(zynqmp_ipi) = { .id = UCLASS_NOP, .of_match = zynqmp_ipi_ids, .probe = zynqmp_ipi_probe, - .flags = DM_FLAG_PROBE_AFTER_BIND, }; diff --git a/drivers/watchdog/da9063-wdt.c b/drivers/watchdog/da9063-wdt.c index b7216b57863..ec9bc033011 100644 --- a/drivers/watchdog/da9063-wdt.c +++ b/drivers/watchdog/da9063-wdt.c @@ -145,5 +145,4 @@ U_BOOT_DRIVER(da9063_wdt) = { .id = UCLASS_WDT, .of_match = da9063_wdt_ids, .ops = &da9063_wdt_ops, - .flags = DM_FLAG_PROBE_AFTER_BIND, }; diff --git a/include/dm/device.h b/include/dm/device.h index add67f9ec06..678cd83c271 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -81,7 +81,10 @@ struct driver_info; */ #define DM_FLAG_VITAL (1 << 14) -/* Device must be probed after it was bound */ +/* Device must be probed after it was bound. This flag is per-device and does + * nothing if set on a U_BOOT_DRIVER() definition. Apply it with + * dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND) in the devices bind function. + */ #define DM_FLAG_PROBE_AFTER_BIND (1 << 15) /* |