MCCC (memory clock controller) uses non-standard measuring process (just
read the rate and return). Provide a way to override default
measurement proces with the leaf cc hook.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Split measurement function into clock rate calculation
(measure_default()) and the wrapper that prepares muxes and then
disables them. This fixes the issue that muxes will not be disabled for
the clocks that are not turned off (because measure function will return
early for disabled clocks).
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
MSM8996 requires additional setup to measure CPU clocks. Add hooks to
customize the mux enable/disable and measurement process.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Preserve the contents of the xo_div4 register. Downstream kernel
preserves the contents of the register. Writing just 1 makes the msm8996
report the value divided by 4 rather than the actual clock frequency.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Add a way to print clocks related to a particular CC. Add -b option,
which takes 'block' name: cam, disp, cpu, gpu, video. Pass "-b core" to
limit debugcc to "core" (gcc) clocks.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Add in msm8936 downstream clock-mapping definitions. This also covers
msm8939, at the level of the fundamental clock layout, there is no
difference between msm8936 and msm8939.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
It looks like post_div_val is a property of debug_mux rather than the
clock itself. It is equal for all the clocks being set. So, set it on a
mux-by-mux bases.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>