msm: clock: Decrease voltage voting overhead for RPM and PCOM clocks
The clk_get_rate() calls that were added to clk_enable(), clk_disable(),
and clk_set_rate() to support voltage scaling result in unnecessary
round-trips to the remote processor for remotely-managed clocks.
Fix this by caching the last set rate in 'struct clk' instead of calling
clk_get() to query it.
Change-Id: I7c303afe3988c3731efb60d1067842cf586baf7e
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock.h b/arch/arm/mach-msm/clock.h
index ed5c9c6..5562746 100644
--- a/arch/arm/mach-msm/clock.h
+++ b/arch/arm/mach-msm/clock.h
@@ -93,6 +93,7 @@
struct clk *depends;
struct clk_vdd_class *vdd_class;
unsigned long fmax[MAX_VDD_LEVELS];
+ unsigned long rate;
struct list_head children;
struct list_head siblings;