Commit Graph

47 Commits

Author SHA1 Message Date
Marijn Suijten
4d332b2b43 meson: Use configuration_data() instead of piping variables through echo
Having a template file with replacement macros is a bit cleaner than
encoding the setup of the file in `meson.build` and piping that through
`echo` with caputred variables.

Unfortunately there appears to be no support for repetition, to e.g.
expand a list of platform names into the various uses (array with comma-
separation, or individual `extern struct` declarations, forcing us to
have some form of string expansion within `meson.build`).
2023-11-06 13:00:56 +01:00
Dmitry Baryshkov
1a0570550e CI: fix the if condition to make it work properly
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:26:24 +02:00
Konrad Dybcio
dd604f9d1f Merge pull request #26 from lumag/meson
Switch to meson build system and add CI
2023-11-06 12:24:08 +01:00
Dmitry Baryshkov
d82ed4d34b CI: add naive cross-compilation test
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:23:06 +02:00
Dmitry Baryshkov
6e28b9165b debugcc: fix building failure on arm32 machines
Fix the following error:

../debugcc.c: In function 'mmap_mux':
../debugcc.c:295:40: error: format '%zx' expects argument of type 'size_t', but argument 2 has type 'long unsigned int' [-Werror=format=]

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:23:06 +02:00
Dmitry Baryshkov
5c94c0c9c7 Add simple CI
Add very simple CI setup to check that debugcc builds correctly.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:01:36 +02:00
Dmitry Baryshkov
9db71d48e8 debugcc: switch to meson
Switch to meson as a build system. Define a list of supported platforms
and use it to generate platforms list and the symlink targets.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 13:01:36 +02:00
Konrad Dybcio
c674428d6a sc8280xp: Add DDR clock
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
2023-04-11 16:26:31 -05:00
Konrad Dybcio
1f2d56984e Add msm8998 / cobalt
NOTE: cpu debug mux support is not included, I can not get it to
cooperate..
2023-02-14 23:17:20 -06:00
Konrad Dybcio
e03d95e8c9 sm6350: Hook up MCCC 2023-02-14 23:17:20 -06:00
Konrad Dybcio
445f058be6 sm6375: Hook up MCCC
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>
2023-02-14 23:17:20 -06:00
Konrad Dybcio
5fe497e2b4 Add SM6375 / blair 2023-02-14 23:17:20 -06:00
Konrad Dybcio
5341f2d08e Add SM6350 / lagoon 2023-02-14 23:17:20 -06:00
Konrad Dybcio
6a32f8a8bd Add SM6125 / trinket 2023-02-14 23:17:20 -06:00
Konrad Dybcio
e449b70045 Add MSM8994 / plutonium
NOTE: this should 99% work on 8992 too, untested though!
2023-02-14 23:17:20 -06:00
Konrad Dybcio
80f81a693b Add SM6115 / bengal
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>
2023-02-14 23:17:20 -06:00
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