msm: clock-local: Initialize cdiv rates to non-rate value
cdiv clocks treat the zero rate as a special rate indicating 'use
the external source'. The initial rate of a clock's rate field is
typically zero. Combine the two facts with the addition of code
to check if the rate has changed between the last clk_set_rate()
call and you find that clk_set_rate(cdiv, 0) will not do what is
advertised (namely switch to the external source).
To solve this dilemma set the rate of the cdiv clock to ULONG_MAX so
that the check for the same rate doesn't trigger.
Change-Id: Ic6e9ed8b3cbf3d6c68ec431ad8ec077e39a175b4
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
diff --git a/arch/arm/mach-msm/clock-8960.c b/arch/arm/mach-msm/clock-8960.c
index fa91249..76f2926 100644
--- a/arch/arm/mach-msm/clock-8960.c
+++ b/arch/arm/mach-msm/clock-8960.c
@@ -4017,6 +4017,7 @@
.dbg_name = "tv_src_div_clk",
.ops = &clk_ops_cdiv,
CLK_INIT(tv_src_div_clk.c),
+ .rate = ULONG_MAX,
},
};
@@ -4423,6 +4424,7 @@
.dbg_name = #i "_clk", \
.ops = &clk_ops_cdiv, \
CLK_INIT(i##_clk.c), \
+ .rate = ULONG_MAX, \
}, \
}
@@ -4442,6 +4444,7 @@
.dbg_name = #i "_clk", \
.ops = &clk_ops_cdiv, \
CLK_INIT(i##_clk.c), \
+ .rate = ULONG_MAX, \
}, \
}