]> git.baikalelectronics.ru Git - kernel.git/commit
clk: at91: avoid sleeping early
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Fri, 20 Sep 2019 15:39:06 +0000 (17:39 +0200)
committerStephen Boyd <sboyd@kernel.org>
Mon, 28 Oct 2019 14:55:01 +0000 (07:55 -0700)
commitce7eeefc110f9e386e2ecc93da0290d526f2ec83
treeb4612e8239fe47aa125d7d69267eb79707096513
parent040fef10401232fae3ccc5f885a60c10cc12756b
clk: at91: avoid sleeping early

It is not allowed to sleep to early in the boot process and this may lead
to kernel issues if the bootloader didn't prepare the slow clock and main
clock.

This results in the following error and dump stack on the AriettaG25:
   bad: scheduling from the idle thread!

Ensure it is possible to sleep, else simply have a delay.

Reported-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lkml.kernel.org/r/20190920153906.20887-1-alexandre.belloni@bootlin.com
Fixes: 2fbde4fd86a7 ("clk: at91: add slow clks driver")
Tested-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/at91/clk-main.c
drivers/clk/at91/sckc.c