[PATCH] ARM: mvebu: Fix of_clk_get() call in a non sleeping context

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Mar 8 12:50:51 PST 2016


On Tue, Mar 08, 2016 at 05:38:11PM +0100, Gregory CLEMENT wrote:
> And from clk_enable comment we have:
> ""
> clk_enable must not sleep, which differentiates it from clk_prepare.  In a
> simple case, clk_enable can be used instead of clk_prepare to ungate a clk
> if the operation will never sleep.
> ""
> 
> Moreoever for me the "must" was to insist to the order of the call no to
> the fact that both must be called.

As the author of the clk API, the idea here is that clk_prepare()
should always be called _before_ clk_enable() for any clock: in
other words, getting a clock and then calling clk_enable() on it
is not legal.

CCF presently enforces this - clk_enable() without a preceding
clk_prepare() will return -ESHUTDOWN.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.



More information about the linux-arm-kernel mailing list