Add convenient macro GENMASK to calculate masks from bits similar to how
it's implemented in kernel linux tools.
This is useful to better describe some specific define instead of using
comments and raw HEX values.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Some device have a different rate for the xo debug oscillator. Add
support for defining custom xo rate in the primary debug mux.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
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>
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>
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>
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>
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>
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>
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>