Commit Graph

57 Commits

Author SHA1 Message Date
Christian Marangi
bde23d9858 debugcc: support setting xo_div4 custom value
Some xo require special value to set it to /4 divisor. Introduce
xo_div4_val to handle this special implementation.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-07 22:49:11 +01:00
Christian Marangi
5dd120810b debugcc: support 32 bit systems
Unsigned long have a different size in 32 bit system and this cause the
malfunction of debugcc returning wrong frequency. Use 64bit unsigned int
to correctly support 32 bit system and provide correct frequency.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-11-07 22:47:41 +01:00
Dmitry Baryshkov
aff941f908 Merge pull request #21 from 0xB0D/master
Add README.md
2023-11-07 17:45:35 +02:00
Dmitry Baryshkov
e68ff01f2d Merge pull request #25 from superna9999/sm8650
Add SM8650 debugcc entries
2023-11-07 17:44:50 +02:00
Neil Armstrong
3f8e83867c Add SM8650 debugcc entries
Add debugcc tables for the SM8650 platform

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
2023-11-07 16:02:04 +01:00
Konrad Dybcio
d744e1a891 Merge pull request #24 from lumag/mux-chain
Rework clock muxes into a chain structure
2023-11-07 12:15:06 +01:00
Dmitry Baryshkov
cf5664f7c4 debugcc: Rework clock muxes into a chain structure
Enforcing a primary+leaf configuration does not walk for all the cases.
Some clocks (msm8996 CPU) have more muxes to be powered on. Other (MCCC)
do not require GCC at all. Make clock measurement more versatile by
reworking GCC + optional leaf into a chain of muxes.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-11-06 14:24:13 +02:00
Konrad Dybcio
132a037a08 Merge pull request #30 from MarijnS95/meson-config-data
meson: Use `configuration_data()` instead of piping variables through `echo`
2023-11-06 13:20:41 +01:00
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
Bryan O'Donoghue
b3f6a9417b Update README
Co-authored-by: Marijn Suijten <marijns95@gmail.com>
2023-06-14 13:05:30 +01:00
Bryan O'Donoghue
58b7b73b34 README: Add a README.md
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>
2023-06-14 13:05:21 +01: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