clk: at91: fix possible deadlock
Lockdep warns about a possible circular locking dependency because using
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 the recently introduced device_node_to_regmap to solve that as it looks
up the regmap in the same list but doesn't care about the clocks.

Reported-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lkml.kernel.org/r/20191128102531.817549-1-alexandre.belloni@bootlin.com
Tested-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
[afa: ported to barebox from from Linux commit 6956eb33abb5dea]
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent 3594c91 commit 7d6d978791b61930d936ad810601ff3d0ec42975
@Alexandre Belloni Alexandre Belloni authored on 13 Apr 2020
Sascha Hauer committed on 15 Apr 2020
Showing 6 changed files
View
drivers/clk/at91/at91sam9260.c
View
drivers/clk/at91/at91sam9rl.c
View
drivers/clk/at91/at91sam9x5.c
View
drivers/clk/at91/pmc.c
View
drivers/clk/at91/sama5d2.c
View
drivers/clk/at91/sama5d4.c