msm: clock-8x60: Allow hand-offs of already-running RCG clocks at boot
Inherit the rate of running rate-settable clocks at boot if the
same rate is supported by the Linux kernel. These clocks will
still be disabled by the auto-off code in late-init if no driver
explicitly enables them before that.
This feature allows Linux drivers to keep a clock enabled all the
way through boot. For glitch-free clocks, drivers can set the
rate of the clock to any supported value at boot and enable it
with no interruption of the clock signal. Non-glitch-free clocks
will still experience some interruption, but this can be avoided
by calling clk_set_rate() with the same rate that was set by the
bootloader (which can be returned by calling clk_get_rate()).
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-local.h b/arch/arm/mach-msm/clock-local.h
index c38a5f2..2455fbf 100644
--- a/arch/arm/mach-msm/clock-local.h
+++ b/arch/arm/mach-msm/clock-local.h
@@ -152,6 +152,7 @@
int rcg_clk_is_enabled(struct clk *clk);
long rcg_clk_round_rate(struct clk *clk, unsigned rate);
struct clk *rcg_clk_get_parent(struct clk *c);
+void rcg_clk_handoff(struct clk *c);
/*
* SYS_VDD voltage levels