diff mbox series

[v2,6/7] of: property: fw_devlink: Follow clock nexus maps

Message ID 20260910-fw-devlink-nexus-ready-v2-6-17ac82dbe226@toradex.com
State Superseded
Headers show
Series of: property: Make fw_devlink follow GPIO, PWM and clock nexus maps | expand

Commit Message

Ernest Van Hoecke Sept. 10, 2026, 2:16 p.m. UTC
From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>

Clock consumers use of_parse_phandle_with_args_map() to resolve
specifiers through clock-map properties. fw_devlink instead parses the
clocks property as a direct phandle reference, so it records the nexus
node as the supplier rather than the mapped clock provider.

A nexus is a translation node, not the clock provider, and need not be
populated as a device. The resulting fwnode link can therefore remain
unresolved and indefinitely defer the consumer while
device_links_check_suppliers() waits for the nexus.

Use the map-aware parser for clocks so fw_devlink resolves the same
provider as the clock consumer API. Direct clock references continue to
work because the map-aware parser returns the original provider when no
clock-map property is present.

Fixes: aacc54c67869 ("clk: Add support for clock nexus dt bindings")
Link: https://lore.kernel.org/all/20260807-schneider-v7-2-rc1-eip201-upstream-v5-0-8785f9531cf0@bootlin.com/
Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
---
 drivers/of/property.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herve Codina Sept. 16, 2026, 6:15 p.m. UTC | #1
Hi Ernest,

On Thu, 10 Sep 2026 16:16:47 +0200
Ernest Van Hoecke <ernestvanhoecke@gmail.com> wrote:

> From: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
> 
> Clock consumers use of_parse_phandle_with_args_map() to resolve
> specifiers through clock-map properties. fw_devlink instead parses the
> clocks property as a direct phandle reference, so it records the nexus
> node as the supplier rather than the mapped clock provider.
> 
> A nexus is a translation node, not the clock provider, and need not be
> populated as a device. The resulting fwnode link can therefore remain
> unresolved and indefinitely defer the consumer while
> device_links_check_suppliers() waits for the nexus.
> 
> Use the map-aware parser for clocks so fw_devlink resolves the same
> provider as the clock consumer API. Direct clock references continue to
> work because the map-aware parser returns the original provider when no
> clock-map property is present.
> 
> Fixes: aacc54c67869 ("clk: Add support for clock nexus dt bindings")

This tag is only in linux-next.
Will it be the same when merged on next release?

> Link: https://lore.kernel.org/all/20260807-schneider-v7-2-rc1-eip201-upstream-v5-0-8785f9531cf0@bootlin.com/
> Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
> ---
>  drivers/of/property.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/property.c b/drivers/of/property.c
> index a9c51d639a2b..48e05f7bae2f 100644

Best regards,
Hervé
diff mbox series

Patch

diff --git a/drivers/of/property.c b/drivers/of/property.c
index a9c51d639a2b..48e05f7bae2f 100644
--- a/drivers/of/property.c
+++ b/drivers/of/property.c
@@ -1422,7 +1422,7 @@  struct supplier_bindings {
 	u8 fwlink_flags;
 };
 
-DEFINE_SIMPLE_PROP(clocks, "clocks", "#clock-cells")
+DEFINE_SIMPLE_NEXUS_PROP(clocks, "clocks", "clock")
 DEFINE_SIMPLE_PROP(interconnects, "interconnects", "#interconnect-cells")
 DEFINE_SIMPLE_PROP(iommus, "iommus", "#iommu-cells")
 DEFINE_SIMPLE_PROP(mboxes, "mboxes", "#mbox-cells")