clk: clk-gate: Resolve parent clock by name

Use clock-names property which is accessible via parent clock OF node
to look up the parent clock by name instead of depending on unreliable
global clock name to perform look up.

Signed-off-by: Marek Vasut <marex@denx.de>
This commit is contained in:
Marek Vasut
2025-03-23 16:58:37 +01:00
committed by Fabio Estevam
parent aee51ad0d9
commit 742e0205d1

View File

@@ -149,7 +149,8 @@ struct clk *clk_register_gate(struct udevice *dev, const char *name,
clk = &gate->clk;
clk->flags = flags;
ret = clk_register(clk, UBOOT_DM_CLK_GATE, name, parent_name);
ret = clk_register(clk, UBOOT_DM_CLK_GATE, name,
clk_resolve_parent_clk(dev, parent_name));
if (ret) {
kfree(gate);
return ERR_PTR(ret);