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:

committed by
Fabio Estevam

parent
df9c287e42
commit
09fa54f6da
@@ -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);
|
||||
|
Reference in New Issue
Block a user