Add a README with a reminder to switch off CONFIG_IO_STRICT_DEVMEM. I
had debugcc working on 8939 and then tried it on 8280xp. It didn't work
but I remembered that there was a CONFIG option that needed to change.
It took a few minutes of menuconfig and Google to recall what that
config option was.
For future reference, lets just document it and whatever else in a
README.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Hook MCCC up on SM6375 where it was validated and intentionally overreserve
the MCCC memory, as mmap expects we reserve at least one ALIGNED page
(which means we're aligned to 4K (0x1000) or whatever our pagesize is AND
that we have to reserve too much and stray from user error when adding
offsets to not try and read memory outside the actual MCCC region).
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
SM6115 and its other bengal friends have 5 debug muxes, one of which
(memory controller) is out of scope here, as it's not defined in dt.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Provide a way to skip programming enable/mux registers (as we do for
div_reg) if the corresponding mask is zero.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
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>