clk: clk-divider: 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:50 +01:00
committed by Fabio Estevam
parent df9c287e42
commit 09fa54f6da

View File

@@ -218,7 +218,8 @@ static struct clk *_register_divider(struct udevice *dev, const char *name,
clk = &div->clk;
clk->flags = flags;
ret = clk_register(clk, UBOOT_DM_CLK_CCF_DIVIDER, name, parent_name);
ret = clk_register(clk, UBOOT_DM_CLK_CCF_DIVIDER, name,
clk_resolve_parent_clk(dev, parent_name));
if (ret) {
kfree(div);
return ERR_PTR(ret);