]> git.baikalelectronics.ru Git - kernel.git/commit
clk: iproc: Do not rely on node name for correct PLL setup
authorFlorian Fainelli <f.fainelli@gmail.com>
Mon, 5 Sep 2022 16:15:03 +0000 (09:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Oct 2022 08:37:45 +0000 (10:37 +0200)
commit2428ae481bd1efcb9bd90f85e34064bb7d3565fa
tree2a7196da94323575dce2b56cd6c1c4952b99f3ec
parent0c10dd1c9d5920ed05746cf8a747cb20bba7b997
clk: iproc: Do not rely on node name for correct PLL setup

[ Upstream commit d73e31c2b4ffdc39f63b9837d2f3ed1feac51b49 ]

After commit 684b545eabf4 ("ARM: dts: BCM5301X: update CRU block
description") a warning from clk-iproc-pll.c was generated due to a
duplicate PLL name as well as the console stopped working. Upon closer
inspection it became clear that iproc_pll_clk_setup() used the Device
Tree node unit name as an unique identifier as well as a parent name to
parent all clocks under the PLL.

BCM5301X was the first platform on which that got noticed because of the
DT node unit name renaming but the same assumptions hold true for any
user of the iproc_pll_clk_setup() function.

The first 'clock-output-names' property is always guaranteed to be
unique as well as providing the actual desired PLL clock name, so we
utilize that to register the PLL and as a parent name of all children
clock.

Fixes: 07b7d3c293ab ("clk: iproc: add initial common clock support")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Rafał Miłecki <rafal@milecki.pl>
Link: https://lore.kernel.org/r/20220905161504.1526-1-f.fainelli@gmail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/bcm/clk-iproc-pll.c