aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/at91/sama5d3.c
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-07-03 09:32:35 +0200
committerStephen Boyd <sboyd@kernel.org>2020-07-24 02:18:42 -0700
commit153bc1c66a8814e621ca0483098ac722be860aaf (patch)
tree8835d2cdfb4621fcb4a8ce2974d242e1c2d3566b /drivers/clk/at91/sama5d3.c
parentLinux 5.8-rc1 (diff)
downloadlinux-dev-153bc1c66a8814e621ca0483098ac722be860aaf.tar.xz
linux-dev-153bc1c66a8814e621ca0483098ac722be860aaf.zip
clk: at91: fix possible dead lock in new drivers
syscon_node_to_regmap() will make the created regmap get and enable the first clock it can parse from the device tree. This clock is not needed to access the registers and should not be enabled at that time. Use device_node_to_regmap to resolve this as it looks up the regmap in the same list but doesn't care about the clocks. This issue is detected by lockdep when booting the sama5d3 with a device tree containing the new clk bindings. This fix already happened in 6956eb33abb5 ("clk: at91: fix possible deadlock") for the drivers that had been migrated to the new clk binding back then. This does the same for the new drivers as well. Fixes: 01e2113de9a5 ("clk: at91: add sam9x60 pmc driver") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.kernel.org/r/20200703073236.23923-1-a.fatoum@pengutronix.de Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/at91/sama5d3.c')
-rw-r--r--drivers/clk/at91/sama5d3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/at91/sama5d3.c b/drivers/clk/at91/sama5d3.c
index 5e4e44dd4c37..5609b04e6565 100644
--- a/drivers/clk/at91/sama5d3.c
+++ b/drivers/clk/at91/sama5d3.c
@@ -121,7 +121,7 @@ static void __init sama5d3_pmc_setup(struct device_node *np)
return;
mainxtal_name = of_clk_get_parent_name(np, i);
- regmap = syscon_node_to_regmap(np);
+ regmap = device_node_to_regmap(np);
if (IS_ERR(regmap))
return;