Commit Graph

31 Commits

Author SHA1 Message Date
Marijn Suijten
7abf9d5f7b sm8150: Document debug mux values on GCC 2023-02-14 10:02:12 -06:00
Marijn Suijten
7365bca626 Implement MCCC measurements for SM8150 and SM8250 2023-02-14 10:02:12 -06:00
Dmitry Baryshkov
a9e76e4f1b debugcc: skip registers with no masks defined
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>
2023-02-14 09:42:21 -06:00
Dmitry Baryshkov
360769b5fc debugcc: allow leaf muxes to override measurement function
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>
2023-02-14 09:42:21 -06:00
Dmitry Baryshkov
bdb901f2ae debugcc: split measurement function
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>
2023-02-14 09:42:21 -06:00
Marijn Suijten
23583b8546 Add SM8250 support 2023-02-14 09:40:27 -06:00
Bjorn Andersson
e60a2d1693 Merge branch 'sm8150' of https://github.com/MarijnS95/debugcc 2023-01-17 20:50:27 -08:00
Dmitry Baryshkov
3ecf48627d msm8996: add block names
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-17 22:31:07 -06:00
Neil Armstrong
97771010c6 Add DEBUGCC entries for SM8550
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-01-17 22:30:46 -06:00
Marijn Suijten
d7dcae1718 Add SM8150 support 2023-01-18 01:55:12 +01:00
Dmitry Baryshkov
d7efd367f9 msm8996: add support for CPU clocks
Measure CPU clusters and CBF clocks.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
783b4ffdd2 debugcc: allow customizing the measurement process
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>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
7c544f0c40 msm8996: add support for MSM8996 platform
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
34fb8ccda7 debugcc: preserve xo_div4 contents
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>
2023-01-05 10:55:11 -06:00
Dmitry Baryshkov
6de6d216d7 debugcc: add block names to all platforms
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-01-05 10:54:17 -06:00
Dmitry Baryshkov
ac35e7a205 debugcc: add support for printing clocks from a single CC
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>
2023-01-05 10:54:17 -06:00
Bjorn Andersson
79d8caba44 Add sc8280xp gcc, dispcc0 and dispcc1
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2022-05-24 18:06:32 -07:00
Dmitry Baryshkov
0acd29c82a sm8450: enable all clocks in the config tables
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2022-05-24 17:45:37 -05:00
Bryan O'Donoghue
d91475ee54 Add MSM8936 platform
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>
2022-04-15 20:47:25 -05:00
Dmitry Baryshkov
c74b999277 Add SM8450 support
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2022-02-08 09:08:07 -08:00
Dmitry Baryshkov
9e99460893 Makefile: add extra dependecy on debugcc.h
Make all objects depend on debugcc.h to let them be rebuilt if the header changes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2021-11-30 19:47:41 -06:00
Dmitry Baryshkov
de23d9a42e debugcc: move post_div_val into struct debug_mux
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>
2021-11-30 19:47:41 -06:00
Dmitry Baryshkov
1487463c28 Create LICENSE
Add BSD-3-Clause text from debugcc.c to the LICENSE file
2021-11-30 19:46:46 -06:00
Dmitry Baryshkov
94e06b2548 Add .gitignore
Add .gitignore file to ignore generated object files and binaries

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2021-11-30 19:46:22 -06:00
Robert Foss
33f035076a Add SM8350 platform
Add SM8350 measure clocks from downstream kernel.
2021-10-15 06:54:21 -07:00